Permalink
Browse files

Make variables ignorable

  • Loading branch information...
1 parent 5fd84c7 commit a8d5e92d451046b615a72e5870a4aaa05009e40e Tomohiro Matsuyama committed Nov 19, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/compiler.lisp
View
5 src/compiler.lisp
@@ -27,7 +27,9 @@
for name = (variable-pattern-name pattern)
collect
(if name
- `(,rest (let ((,name ,(car vars))) ,.then))
+ `(,rest (let ((,name ,(car vars)))
+ (declare (ignorable ,name))
+ ,.then))
`(,rest ,.then)))))
`(%match ,(cdr vars)
,clauses
@@ -117,6 +119,7 @@
collect (if (member var vars) var))
collect `((,subpattern) (values ,@vals)))
(fail))
+ (declare (ignorable ,@new-vars))
(%match ,(cdr vars)
((,rest ,.then))
(fail)))

0 comments on commit a8d5e92

Please sign in to comment.