Permalink
Browse files

Added type-expand function.

  • Loading branch information...
1 parent 0395446 commit bec881c59e759aa4bd95ac7c96a28ec1c4fd16f4 Tomohiro Matsuyama committed Mar 18, 2012
Showing with 14 additions and 1 deletion.
  1. +6 −0 README.markdown
  2. +2 −1 src/packages.lisp
  3. +6 −0 src/typespecs.lisp
View
6 README.markdown
@@ -204,6 +204,12 @@ Examples:
Returns true if TYPE-SPECIFIER is a valid type specfiier.
+## [Function] type-expand
+
+ type-expand type-specifier &optional env
+
+Expand TYPE-SPECIFIER in the lexical environment ENV.
+
Authors
-------
View
3 src/packages.lisp
@@ -25,4 +25,5 @@
#:non-nil
- #:type-specifier-p))
+ #:type-specifier-p
+ #:type-expand))
View
6 src/typespecs.lisp
@@ -6,3 +6,9 @@
#+sbcl (sb-ext:valid-type-specifier-p type-specifier)
#+openmcl (ccl:type-specifier-p type-specifier)
#+ecl (c::valid-type-specifier type-specifier)))
+
+(defun type-expand (type-specifier &optional env)
+ "Expand TYPE-SPECIFIER in the lexical environment ENV."
+ #+sbcl (sb-ext::typexpand type-specifier env)
+ #+openmcl (ccl::type-expand type-specifier env)
+ #-(or sbcl openmcl) type-specifier)

0 comments on commit bec881c

Please sign in to comment.