0.8.7.46:
[sbcl.git] / src / code / late-type.lisp
index 799d6e9..ff45e57 100644 (file)
   (negation-type-type x))
 
 (!define-type-method (negation :unparse) (x)
-  `(not ,(type-specifier (negation-type-type x))))
+  (if (type= (negation-type-type x) (specifier-type 'cons))
+      'atom
+      `(not ,(type-specifier (negation-type-type x)))))
 
 (!define-type-method (negation :simple-subtypep) (type1 type2)
   (csubtypep (negation-type-type type2) (negation-type-type type1)))
       (multiple-value-bind (equalp certainp)
          (type= (array-type-element-type type1)
                 (array-type-element-type type2))
-       ;; by its nature, the call to TYPE= should never return NIL,
+       ;; By its nature, the call to TYPE= should never return NIL,
        ;; T, as we don't know what the UNKNOWN-TYPE will grow up to
        ;; be.  -- CSR, 2002-08-19
        (aver (not (and (not equalp) certainp)))
 (!define-type-method (array :negate) (type)
   ;; FIXME (and hint to PFD): we're vulnerable here to attacks of the
   ;; form "are (AND ARRAY (NOT (ARRAY T))) and (OR (ARRAY BIT) (ARRAY
-  ;; NIL) (ARRAY CHAR) ...) equivalent?  -- CSR, 2003-12-10
+  ;; NIL) (ARRAY CHAR) ...) equivalent?" -- CSR, 2003-12-10
   (make-negation-type :type type))
 
 (!define-type-method (array :unparse) (type)