0.8.7.38:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 2 Feb 2004 16:58:34 +0000 (16:58 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 2 Feb 2004 16:58:34 +0000 (16:58 +0000)
Make (specifier-type 'atom) unparse as ATOM, now that we have
a non-sucky negation-type and NOT translator

src/code/late-type.lisp
tests/type.pure.lisp
version.lisp-expr

index d78c38b..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)))
index 73eb277..085ba71 100644 (file)
                        array
                        generic-function
                        simple-error
-                       ;; so it might seem easy to change the HAIRY
-                       ;; :UNPARSE method to recognize that (NOT
-                       ;; CONS) should unparse as ATOM. However, we
-                       ;; then lose the nice (SUBTYPEP '(NOT ATOM)
-                       ;; 'CONS) => T,T behaviour that we get from
-                       ;; simplifying (NOT ATOM) -> (NOT (NOT CONS))
-                       ;; -> CONS. So, for now, we leave this
-                       ;; commented out.
-                       ;;
-                       ;; atom
+                       atom
                        hash-table
                        simple-string              
                        base-char
index 411319e..a80db6b 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.7.37"
+"0.8.7.38"