G=E1bor Melis <mega@...> writes:
> 2) is (MAKE-NUMERIC-TYPE) with NIL as class valid and does it mean
> REAL? (SPECIFIER-TYPE 'REAL) gives a union of SINGLE-FLOAT
> DOUBLE-FLOAT and RATIONAL. However, if it does mean REAL
> then type.patch is probably needed.
In theory, I think no: ideally all operations should be with canonical
types as recognized by the type system, and bogus values that aren't
catered for should be detected at type creation time.
However, the snag in this plan is that the compiler type inference
doesn't believe in it yet; instead of being a well-behaved citizen and
asking the type system for e.g. (type-intersection a-type b-type) or
(specifier-type `(integer ,low ,high)), it goes off and does the
creation of types itself (float-tran.lisp and srctran.lisp). Partly
this was probably motivated by efficiency concerns, and partly it
predates the great refactoring of the type system anyway; I think this
should be fixed, but in the meantime your patch might well be
necessary for smooth operation.