X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftype-class.lisp;h=94bf0551a793d4094720fa0224222280df379644;hb=0c3bbfaa2286626a2d915c8810f690aefc702661;hp=0a1a5b5f7db5141cff5dedbc44097dcdb9b3e08c;hpb=21f58646db948549efdc4a8bb879dc57afea1af7;p=sbcl.git diff --git a/src/code/type-class.lisp b/src/code/type-class.lisp index 0a1a5b5..94bf055 100644 --- a/src/code/type-class.lisp +++ b/src/code/type-class.lisp @@ -90,6 +90,11 @@ ;; a function which returns a Common Lisp type specifier ;; representing this type (unparse #'must-supply-this :type function) + ;; a function which returns T if the CTYPE is inhabited by a single + ;; object and, as a value, the object. Otherwise, returns NIL, NIL. + ;; The default case (NIL) is interpreted as a function that always + ;; returns NIL, NIL. + (singleton-p nil :type (or function null)) #| Not used, and not really right. Probably we want a TYPE= alist for the @@ -123,7 +128,8 @@ (:simple-= . type-class-simple-=) (:complex-= . type-class-complex-=) (:negate . type-class-negate) - (:unparse . type-class-unparse)))) + (:unparse . type-class-unparse) + (:singleton-p . type-class-singleton-p)))) (declaim (ftype (function (type-class) type-class) copy-type-class-coldly)) (eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute)