0.7.12.31:
authorChristophe Rhodes <csr21@cam.ac.uk>
Sun, 9 Feb 2003 20:20:40 +0000 (20:20 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sun, 9 Feb 2003 20:20:40 +0000 (20:20 +0000)
commit814fc23f60ba84318a3dfea112e6d98fd0293835
treeb04e9ab5cab62fca28ef020a812afadc00d7a81f
parent8d404ad80075771ffb783fda8a7328982a67f820
0.7.12.31:
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
obvious generalizations.
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!)
package-data-list.lisp-expr
src/code/early-extensions.lisp
src/code/early-type.lisp
src/code/late-type.lisp
tests/type.pure.lisp
version.lisp-expr