Skip to content

Fix detection of GAP strings - #1236

Open
fingolfin wants to merge 3 commits into
semigroups:stable-5.7from
fingolfin:mh/IS_STRING_REP
Open

fingolfin wants to merge 3 commits into
semigroups:stable-5.7from
fingolfin:mh/IS_STRING_REP

Conversation

@fingolfin

Copy link
Copy Markdown
Contributor

... by using IS_STRING_REP: this then also covers sorted and unsorted strings. Of the following six strings, the old code only accepted the first two.

gap> t:="str";; TNUM_OBJ(t);
72
gap> t:=Immutable("str");; TNUM_OBJ(t);
73
gap> t:="cba";;IsSet(t);; TNUM_OBJ(t);
74
gap> t:=Immutable("cba");;IsSet(t);; TNUM_OBJ(t);
75
gap> t:="abc";;IsSet(t);; TNUM_OBJ(t);
76
gap> t:=Immutable("abc");;IsSet(t);; TNUM_OBJ(t);
77

(My secret true motivation for this is removing the last use of IMMUTABLE in a GAP kernel extension, to prepare the ground for gap-system/gap#6025.)

mtorpey and others added 3 commits September 29, 2026 10:36
... by using IS_STRING_REP: this then also covers sorted and
unsorted strings. Of the following six strings, the old code only
accepted the first two.

    gap> t:="str";; TNUM_OBJ(t);
    72
    gap> t:=Immutable("str");; TNUM_OBJ(t);
    73
    gap> t:="cba";;IsSet(t);; TNUM_OBJ(t);
    74
    gap> t:=Immutable("cba");;IsSet(t);; TNUM_OBJ(t);
    75
    gap> t:="abc";;IsSet(t);; TNUM_OBJ(t);
    76
    gap> t:=Immutable("abc");;IsSet(t);; TNUM_OBJ(t);
    77
@fingolfin
fingolfin changed the base branch from main to stable-5.7 October 8, 2026 13:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants