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

Avoid using InstallValue on non-plain objects #4919

Merged
merged 1 commit into from
Jul 1, 2022
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
18 changes: 18 additions & 0 deletions lib/cyclotom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@
##


#############################################################################
##
#V Cyclotomics . . . . . . . . . . . . . . . . . . field of all cyclotomics
##
BindGlobal( "Cyclotomics", Objectify( NewType(
CollectionsFamily( CyclotomicsFamily ),
IsField and IsAttributeStoringRep ),
rec() ) );
SetName( Cyclotomics, "Cyclotomics" );
SetLeftActingDomain( Cyclotomics, Rationals );
SetIsFiniteDimensional( Cyclotomics, false );
SetIsFinite( Cyclotomics, false );
SetIsWholeFamily( Cyclotomics, true );
SetDegreeOverPrimeField( Cyclotomics, infinity );
SetDimension( Cyclotomics, infinity );
SetRepresentative(Cyclotomics, 0);


#############################################################################
##
#M Conductor( <list> ) . . . . . . . . . . . . . . . . . . . . . for a list
Expand Down
4 changes: 2 additions & 2 deletions lib/fldabnum.gd
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ InstallIsomorphismMaintenance( GaloisStabilizer,
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalVariable( "Rationals", "field of rationals" );
DeclareGlobalName( "Rationals" );

DeclareSynonym( "IsRationals",
IsCyclotomicCollection and IsField and IsPrimeField );
Expand Down Expand Up @@ -705,7 +705,7 @@ DeclareGlobalFunction( "LenstraBase" );
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalVariable( "Cyclotomics", "domain of all cyclotomics" );
DeclareGlobalName( "Cyclotomics" );


#############################################################################
Expand Down
18 changes: 0 additions & 18 deletions lib/fldabnum.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1649,24 +1649,6 @@ InstallMethod( Coefficients,
end );


#############################################################################
##
#V Cyclotomics . . . . . . . . . . . . . . . . . . field of all cyclotomics
##
InstallValue( Cyclotomics, Objectify( NewType(
CollectionsFamily( CyclotomicsFamily ),
IsField and IsAttributeStoringRep ),
rec() ) );
SetName( Cyclotomics, "Cyclotomics" );
SetLeftActingDomain( Cyclotomics, Rationals );
SetIsFiniteDimensional( Cyclotomics, false );
SetIsFinite( Cyclotomics, false );
SetIsWholeFamily( Cyclotomics, true );
SetDegreeOverPrimeField( Cyclotomics, infinity );
SetDimension( Cyclotomics, infinity );
SetRepresentative(Cyclotomics, 0);


#############################################################################
##
## Automorphisms of abelian number fields
Expand Down
4 changes: 2 additions & 2 deletions lib/random.gd
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ if IsHPCGAP then
MakeThreadLocal( "GlobalRandomSource" );
MakeThreadLocal( "GlobalMersenneTwister" );
else
DeclareGlobalVariable( "GlobalRandomSource" );
DeclareGlobalVariable( "GlobalMersenneTwister" );
DeclareGlobalName( "GlobalRandomSource" );
DeclareGlobalName( "GlobalMersenneTwister" );
fi;

#############################################################################
Expand Down
4 changes: 2 additions & 2 deletions lib/random.gi
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ if IsHPCGAP then
BindThreadLocalConstructor("GlobalRandomSource", {} ->
RandomSource(IsGAPRandomSource, GET_RANDOM_SEED_COUNTER()));
else
InstallValue(GlobalRandomSource, RandomSource(IsGAPRandomSource, 1));
BindGlobal("GlobalRandomSource", RandomSource(IsGAPRandomSource, 1));
fi;


Expand Down Expand Up @@ -228,7 +228,7 @@ if IsHPCGAP then
BindThreadLocalConstructor("GlobalMersenneTwister", {} ->
RandomSource(IsMersenneTwister, String(GET_RANDOM_SEED_COUNTER())));
else
InstallValue(GlobalMersenneTwister, RandomSource(IsMersenneTwister, "1"));
BindGlobal("GlobalMersenneTwister", RandomSource(IsMersenneTwister, "1"));
fi;

# default random method for lists and pairs of integers using the Mersenne
Expand Down
2 changes: 1 addition & 1 deletion lib/rational.gi
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
##
#V Rationals . . . . . . . . . . . . . . . . . . . . . . field of rationals
##
InstallValue( Rationals, Objectify( NewType(
BindGlobal( "Rationals", Objectify( NewType(
CollectionsFamily( CyclotomicsFamily ),
IsRationals and IsAttributeStoringRep ), rec() ) );
SetName( Rationals, "Rationals" );
Expand Down