Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added type-expand function.

  • Loading branch information...
commit bec881c59e759aa4bd95ac7c96a28ec1c4fd16f4 1 parent 0395446
Tomohiro Matsuyama authored
Showing with 14 additions and 1 deletion.
  1. +6 −0 README.markdown
  2. +2 −1  src/packages.lisp
  3. +6 −0 src/typespecs.lisp
6 README.markdown
View
@@ -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
-------
3  src/packages.lisp
View
@@ -25,4 +25,5 @@
#:non-nil
- #:type-specifier-p))
+ #:type-specifier-p
+ #:type-expand))
6 src/typespecs.lisp
View
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.