Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added special type constructor type-of, which accepts a value.

  • Loading branch information...
commit 64147f26d8d62cb4ccb711a8ab0401bfa31b4f48 1 parent 5be4afc
@Ralith Ralith authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/specials.lisp
View
4 src/specials.lisp
@@ -20,6 +20,10 @@
((declare (ignore vars))
(values (type-construct type) constraints)))
+(def-type-special "type-of" self (value)
+ (env (list self (resolve value env)))
+ ((form-type (infer-expr value))))
+
(defmacro defspecial (name self (&rest args)
(env &body resolver)
(&body inferrer)
Please sign in to comment.
Something went wrong with that request. Please try again.