X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Falien-type.lisp;h=5aed5cd2cf981d859ffc39c45c5f7bc8b58a61aa;hb=dae76a317682df7472ee85d1a0f6a0248801a6ae;hp=41a6e84cd0032eb4bc8746b1cc92330b058a2a40;hpb=ce02ab2ecd9c6ae2e570abd8c93ebf3be55bbdad;p=sbcl.git diff --git a/src/code/alien-type.lisp b/src/code/alien-type.lisp index 41a6e84..5aed5cd 100644 --- a/src/code/alien-type.lisp +++ b/src/code/alien-type.lisp @@ -26,6 +26,9 @@ (!define-type-class alien) +(!define-type-method (alien :negate) (type) + (make-negation-type :type type)) + (!define-type-method (alien :unparse) (type) `(alien ,(unparse-alien-type (alien-type-type-alien-type type)))) @@ -38,11 +41,6 @@ ;;; others (toplevel form time instead of cold load init time) because ;;; ALIEN-VALUE itself is a structure which isn't defined until fairly ;;; late. -;;; -;;; FIXME: I'm somewhat tempted to just punt ALIEN from the type system. -;;; It's sufficiently unlike the others that it's a bit of a pain, and -;;; it doesn't seem to be put to any good use either in type inference or -;;; in type declarations. (!define-superclasses alien ((alien-value)) progn) (!define-type-method (alien :simple-=) (type1 type2) @@ -65,7 +63,7 @@ (if alien-type (let ((lisp-rep-type (compute-lisp-rep-type alien-type))) (if lisp-rep-type - (specifier-type lisp-rep-type) + (single-value-specifier-type lisp-rep-type) (%make-alien-type-type alien-type))) *universal-type*))