Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/type.gi
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ function(oper)
type := "Representation";
fi;
fi;
elif IsOperation(FLAG1_FILTER(oper)) and IsOperation(FLAG1_FILTER(oper)) then
# this is a setter for an and-filter
type := "Setter";
elif FLAG1_FILTER(oper) > 0 then
# this is a setter for an elementary filter
type := "Setter";
elif Tester(oper) <> false then
# oper is an attribute
Expand Down
20 changes: 17 additions & 3 deletions tst/testinstall/type.tst
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,36 @@ true
gap> TypeOfOperation(IsFilter);
Error, <oper> must be an operation

#
# elementary filters: property
gap> TypeOfOperation(IsAbelian);
"Property"
gap> TypeOfOperation(HasIsAbelian);
"Filter"
gap> TypeOfOperation(SetIsAbelian);
"Setter"

# and-filters
gap> TypeOfOperation(IsPGroup and IsAbelian);
"Property"
gap> TypeOfOperation(HasIsPGroup and HasIsAbelian);
"Filter"
gap> TypeOfOperation(Tester(IsPGroup and IsAbelian));
"Filter"
gap> TypeOfOperation(Setter(IsPGroup and IsAbelian));
"Setter"

# kernel category
gap> TypeOfOperation(IsMutable);
"Category"
gap> TypeOfOperation(Setter(IsMutable));
"Setter"

# other
gap> TypeOfOperation(\+);
"Operation"
gap> TypeOfOperation(Size);
"Attribute"
gap> TypeOfOperation(AbelianGroupCons);
"Constructor"
gap> TypeOfOperation(Setter(IS_MUTABLE_OBJ));
"Setter"

#