Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; type-system-deftypes.lisp
- (deftype pvar (&optional (element-type '*))
- ;; I have to return a satisfies type with a closure so that typep can work.
- ;; But, returning a closure will blow up both subtypep and the compiler on lucid.
- (let ((g (gentemp))
- (closure (*lisp-i::pvar-type-predicate
- (cadr (*lisp-i::canonical-pvar-type `(pvar ,element-type))))))
- ; (format t "////////// ~S //////////~%" closure)
- (setf (symbol-function g)
- (lambda (&rest args) (apply closure args)))
- `(satisfies ,g)))
Add Comment
Please, Sign In to add comment