X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftypedefs.lisp;h=6169aceafbb13bed42ab32a14ea34138c927dbd5;hb=8731c1a7c1a585d190151fa881050fb5e14c0616;hp=36c840628d3aa202ec1ac4f5ddd4cf279fb602a1;hpb=4eb1a6d3ad2b7dcc19ac0ec979a1eb1eb049659a;p=sbcl.git diff --git a/src/code/typedefs.lisp b/src/code/typedefs.lisp index 36c8406..6169ace 100644 --- a/src/code/typedefs.lisp +++ b/src/code/typedefs.lisp @@ -78,7 +78,17 @@ ;; (since EQ hashing can't be done portably) (hash-value (random (1+ most-positive-fixnum)) :type (and fixnum unsigned-byte) - :read-only t)) + :read-only t) + ;; Can this object contain other types? A global property of our + ;; implementation (which unfortunately seems impossible to enforce + ;; with assertions or other in-the-code checks and constraints) is + ;; that subclasses which don't contain other types correspond to + ;; disjoint subsets (except of course for the NAMED-TYPE T, which + ;; covers everything). So NUMBER-TYPE is disjoint from CONS-TYPE is + ;; is disjoint from MEMBER-TYPE and so forth. But types which can + ;; contain other types, like HAIRY-TYPE and INTERSECTION-TYPE, can + ;; violate this rule. + (might-contain-other-types-p nil :read-only t)) (def!method print-object ((ctype ctype) stream) (print-unreadable-object (ctype stream :type t) (prin1 (type-specifier ctype) stream)))