propagate finiteness at construction time
This commit is contained in:
parent
9af5d627d8
commit
1266a5ed34
@ -33,13 +33,17 @@ end);
|
||||
|
||||
InstallGlobalFunction(CloneOfTypeByGenerators,
|
||||
function(cat, fam, gens, genAttrib, tableCstr)
|
||||
local M;
|
||||
local M, elf;
|
||||
if not(IsEmpty(gens) or IsIdenticalObj(FamilyObj(gens), fam)) then
|
||||
Error("<fam> and family of <gens> do not match");
|
||||
fi;
|
||||
M := Objectify(NewType( fam, cat and IsAttributeStoringRep), rec());
|
||||
Setter(genAttrib)(M, AsList(gens));
|
||||
SetConstructorFromTable(M, tableCstr);
|
||||
elf := ElementsFamily(fam);
|
||||
# Since there doesn't seem to be a way to make the IsFinite method based
|
||||
# on the family being finite into an immediate method:
|
||||
if HasIsFinite(elf) and IsFinite(elf) then SetIsFinite(M, true); fi;
|
||||
return M;
|
||||
end);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user