GNU bug report logs -
#66615
30.0.50; Inconsistent 'number-or-marker' type definition in the cl- machinery
Previous Next
Reported by: Andrea Corallo <acorallo <at> gnu.org>
Date: Wed, 18 Oct 2023 18:07:02 UTC
Severity: normal
Found in version 30.0.50
Done: Andrea Corallo <acorallo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 66615 <at> debbugs.gnu.org (full text, mbox):
> I've to question now the following entry introduced in
> `cl--typeof-types' for correctness:
>
> (integer number integer-or-marker number-or-marker atom)
>
> The doc says :
> Each element has the form (TYPE . SUPERTYPES) where TYPE is one of
> the symbols returned by ‘type-of’, and SUPERTYPES is the list of its
> supertypes from the most specific to least specific.
>
> And indeed not every 'number' is an 'integer-or-marker'.
The subtype relation doesn't derive from a tree but a DAG so the
SUPERTYPES represents *a* linearization of the parents but just because
`number` appears before `integer-or-marker` doesn't mean that it's
a subtype of it. It just means I judged that it should be considered
"more specific".
The same effect is in play for:
(null symbol list sequence atom)
where clearly `symbol` is a subtype of neither `list` nor `sequence`.
> I suspect that's the reason why this commit introduces few failures in
> the native-comp testsuite.
If you need to know the list of supertypes of `number`, we could add
that info explicitly, or you could "guess" it as the intersection of all
the types that appear after `number` in `cl--typeof-types`:
(integer number integer-or-marker number-or-marker atom)
[...]
(float number number-or-marker atom)
[...]
i.e. the intersection of (integer-or-marker number-or-marker atom)
and (number-or-marker atom).
Stefan
This bug report was last modified 1 year and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.