Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate undocumented extra arguments for DeclareGlobalFunction and InstallGlobalFunction #3694

Merged
merged 1 commit into from
Oct 9, 2019
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
8 changes: 4 additions & 4 deletions lib/dict.gd
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ DeclareRepresentation( "IsDenseHashRep",
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "DenseHashTable", [] );
DeclareGlobalFunction( "DenseHashTable" );


#############################################################################
Expand Down Expand Up @@ -530,7 +530,7 @@ BindGlobal("DefaultSparseHashWithIKRepType",
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "SparseHashTable", [] );
DeclareGlobalFunction( "SparseHashTable" );

#############################################################################
##
Expand All @@ -547,7 +547,7 @@ DeclareGlobalFunction( "SparseHashTable", [] );
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "DoubleHashDictSize", [ IsSparseHashRep ] );
DeclareGlobalFunction( "DoubleHashDictSize" );
DeclareSynonym("DoubleHashArraySize", DoubleHashDictSize);

# almost duplicate without any extras - thus faster
Expand Down Expand Up @@ -575,7 +575,7 @@ DeclareSynonym("DoubleHashArraySize", DoubleHashDictSize);
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "IntegerHashFunction", [ IsInt, IsInt, IsInt ] );
DeclareGlobalFunction( "IntegerHashFunction" );
DeclareSynonym( "HashFunct", IntegerHashFunction);

#############################################################################
Expand Down
2 changes: 1 addition & 1 deletion lib/grp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3462,7 +3462,7 @@ KeyDependentOperation( "HallSubgroup", IsGroup, IsList, ReturnTrue );
## </Description>
## </ManSection>
##
DeclareGlobalFunction( "NormalHallSubgroupsFromSylows", [ IsGroup ] );
DeclareGlobalFunction( "NormalHallSubgroupsFromSylows" );


#############################################################################
Expand Down
14 changes: 6 additions & 8 deletions lib/grpnames.gd
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ DeclareOperation( "IsTrivialNormalIntersection",
## </Description>
## </ManSection>
##
DeclareGlobalFunction( "IsTrivialNormalIntersectionInList",
[ IsList, IsGroup, IsGroup ] );
DeclareGlobalFunction( "IsTrivialNormalIntersectionInList" );

#############################################################################
##
Expand All @@ -74,7 +73,7 @@ DeclareGlobalFunction( "IsTrivialNormalIntersectionInList",
## </Description>
## </ManSection>
##
DeclareGlobalFunction( "UnionIfCanEasilySortElements", IsList );
DeclareGlobalFunction( "UnionIfCanEasilySortElements" );

#############################################################################
##
Expand All @@ -92,7 +91,7 @@ DeclareGlobalFunction( "UnionIfCanEasilySortElements", IsList );
## </Description>
## </ManSection>
##
DeclareGlobalFunction( "AddSetIfCanEasilySortElements", IsList );
DeclareGlobalFunction( "AddSetIfCanEasilySortElements" );

#############################################################################
##
Expand Down Expand Up @@ -283,8 +282,7 @@ DeclareAttribute( "CharacteristicFactorsOfGroup", IsGroup );
## and where it is in the b-sequence if any. Then the
## linear algorithm above may be used.
##
DeclareGlobalFunction( "DirectFactorsOfGroupFromList",
[ IsGroup, IsList, IsList ] );
DeclareGlobalFunction( "DirectFactorsOfGroupFromList" );

#############################################################################
##
Expand All @@ -305,7 +303,7 @@ DeclareGlobalFunction( "DirectFactorsOfGroupFromList",
## </Description>
## </ManSection>
##
DeclareGlobalFunction( "DirectFactorsOfGroupByKN", IsGroup );
DeclareGlobalFunction( "DirectFactorsOfGroupByKN" );

#############################################################################
##
Expand Down Expand Up @@ -346,7 +344,7 @@ DeclareGlobalFunction( "DirectFactorsOfGroupByKN", IsGroup );
## </Description>
## </ManSection>
##
DeclareGlobalFunction( "SemidirectDecompositionsOfFiniteGroup", IsGroup );
DeclareGlobalFunction( "SemidirectDecompositionsOfFiniteGroup" );

#############################################################################
##
Expand Down
6 changes: 3 additions & 3 deletions lib/grpperm.gd
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ DeclareGlobalFunction( "TransitiveGroupsAvailable" );

# dummy declarations to satisfy library references to transitive groups
# library
DeclareGlobalFunction( "NrTransitiveGroups", "placeholder for transgrp package" );
DeclareGlobalFunction( "TransitiveGroup", "placeholder for transgrp package" );
DeclareGlobalFunction( "TRANSProperties", "placeholder for transgrp package" );
DeclareGlobalFunction( "NrTransitiveGroups" );
DeclareGlobalFunction( "TransitiveGroup" );
DeclareGlobalFunction( "TRANSProperties" );

#############################################################################
##
Expand Down
2 changes: 1 addition & 1 deletion lib/lierep.gd
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ DeclareGlobalFunction( "ValueCochain" );
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "LieCoboundaryOperator", "Lie coboundary operator" );
DeclareGlobalFunction( "LieCoboundaryOperator" );

#############################################################################
##
Expand Down
4 changes: 2 additions & 2 deletions lib/list.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ DeclareOperation( "PositionBound", [ IsList ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "PositionsBound", [IsList] );
DeclareGlobalFunction( "PositionsBound" );


#############################################################################
Expand Down Expand Up @@ -1566,7 +1566,7 @@ DeclareOperation( "Flat", [ IsList ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "Reversed", [ IsDenseList ] );
DeclareGlobalFunction( "Reversed" );


#############################################################################
Expand Down
4 changes: 2 additions & 2 deletions lib/matobj2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ DeclareOperation( "ExtractSubVector", [IsVectorObj,IsList] );

# DeclareOperation( "ShallowCopy", [IsVectorObj] );

# DeclareGlobalFunction( "StructuralCopy", [IsVectorObj] );
# DeclareGlobalFunction( "StructuralCopy" );

# DeclareOperation( "ViewObj", [IsVectorObj] );

Expand Down Expand Up @@ -870,7 +870,7 @@ DeclareOperation( "[]:=", [IsMatrixObj,IsPosInt,IsPosInt,IsObject] );
# then StructuralCopy will return a new list of vectors, which again contains the
# same (identical) immutable vectors, and mutable copies of the other vectors.
# Whereas with MutableCopyMat, all new rows will be mutable
# DeclareGlobalFunction( "StructuralCopy", [IsMatrixObj] );
# DeclareGlobalFunction( "StructuralCopy" );

# DeclareOperation( "ViewObj", [IsMatrixObj] );

Expand Down
8 changes: 8 additions & 0 deletions lib/oper.g
Original file line number Diff line number Diff line change
Expand Up @@ -1856,6 +1856,10 @@ BIND_GLOBAL( "DeclareGlobalFunction", function( arg )
local name;

name := arg[1];
if LEN_LIST(arg) > 1 then
INFO_DEBUG(1, "DeclareGlobalFunction: too many arguments in ",
INPUT_FILENAME(), ":", STRING_INT(INPUT_LINENUMBER()));
fi;
atomic GLOBAL_FUNCTION_NAMES do
ADD_SET( GLOBAL_FUNCTION_NAMES, IMMUTABLE_COPY_OBJ(name) );
od;
Expand All @@ -1865,6 +1869,10 @@ end );
BIND_GLOBAL( "InstallGlobalFunction", function( arg )
local oper, info, func;

if LEN_LIST(arg) > 2 then
INFO_DEBUG(1, "InstallGlobalFunction: too many arguments in ",
INPUT_FILENAME(), ":", STRING_INT(INPUT_LINENUMBER()));
fi;
if LEN_LIST(arg) = 3 then
oper := arg[1];
info := arg[2];
Expand Down
3 changes: 1 addition & 2 deletions lib/tuples.gd
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,4 @@ DeclareOperation( "DirectProductElementNC",
## </Description>
## </ManSection>
## <#/GAPDoc>
DeclareGlobalFunction( "DirectProductFamily",
"for a dense list of collection families" );
DeclareGlobalFunction( "DirectProductFamily" );