Skip to content

Commit

Permalink
Only declare DegreeOfMatrixGroup if it is missing
Browse files Browse the repository at this point in the history
This is arguably cleaner than turning off debug info messages temporarily.

I've submitted a symmetric change to primgrp, see gap-packages/primgrp#42, so that these two packages can be loaded in either order without producing a warning about this double declaration.
  • Loading branch information
fingolfin authored and bh11 committed Apr 24, 2021
1 parent ca94b3b commit b18293b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/matmeths.gd
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ DeclareOperation("IsPrimitive", [IsMatrixGroup, IsField]);
##
## see IRREDSOL documentation
##
IRREDSOL_tmp := InfoLevel(InfoDebug);
SetInfoLevel(InfoDebug, 0); # suppress DeclareSynonym warning

DeclareSynonymAttr("DegreeOfMatrixGroup", DimensionOfMatrixGroup);
if not IsBound(DegreeOfMatrixGroup) then
# DegreeOfMatrixGroup is also declared identically in primgrp, so to
# avoid warnings we only define it if necessary
DeclareSynonymAttr("DegreeOfMatrixGroup", DimensionOfMatrixGroup);
fi;
DECLARE_IRREDSOL_SYNONYMS_ATTR("DegreeOfMatrixGroup");

SetInfoLevel(InfoDebug,IRREDSOL_tmp);


############################################################################
##
Expand Down

0 comments on commit b18293b

Please sign in to comment.