Guest User

Untitled

a guest
Feb 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. ;; type-system-deftypes.lisp
  2. (deftype pvar (&optional (element-type '*))
  3. ;; I have to return a satisfies type with a closure so that typep can work.
  4. ;; But, returning a closure will blow up both subtypep and the compiler on lucid.
  5. (let ((g (gentemp))
  6. (closure (*lisp-i::pvar-type-predicate
  7. (cadr (*lisp-i::canonical-pvar-type `(pvar ,element-type))))))
  8. ; (format t "////////// ~S //////////~%" closure)
  9. (setf (symbol-function g)
  10. (lambda (&rest args) (apply closure args)))
  11. `(satisfies ,g)))
Add Comment
Please, Sign In to add comment