Yet another incremental extension to the type system algorithms.
In the presence of types such as (MEMBER 1 "foo" (X)), we
cannot hash VALUES-SPECIFIER-TYPE on EQUAL, because two
such types can contain the same or different (under EQL)
"foo" or (X), and yet be the same under EQUALity. So
... define a new function EQUAL-BUT-NO-CAR-RECURSION, which is
almost but not quite what it sounds (it tests strings
bit-vectors and lists by EQL, not EQUAL);
... use it as the new test function for the
VALUES-SPECIFIER-TYPE hash table.
The presence of numeric types in NOT types can be problematic,
as Paul Dietz' test of (OR BIGNUM FIXNUM) showed. So
... work a lot harder in the NOT type translator, to bring
numeric types out: we treat (NOT (INTEGER a b)) as
(OR (NOT INTEGER) (INTEGER * a) (INTEGER b *)), with the
Now (AND INTEGER (NOT FIXNUM)) parses as
`(OR (INTEGER * ,(1- MOST-NEGATIVE-FIXNUM))
(INTEGER ,(1+ MOST-POSITIVE-FIXNUM))
which is right, but no longer an intersection type, so
... move BIGNUM unparsing from INTERSECTION-TYPE to UNION-TYPE.
Even with all this, we don't get (OR INTEGER RATIO) right, so
... teach the type system some more set theory, with new
HAIRY-TYPE and INTERSECTION union methods.
Now (SUBTYPEP 'RATIONAL '(OR INTEGER RATIO)) returns T, T
(and all the people rejoiced!)