Commit 32ad04f1 authored by Alex Wood's avatar Alex Wood
Browse files

Don't check constantness of lambda list parameters

1) There is a bug when using allow-specializers.
(#49: #49)
2) Constancy is a semantic rather than syntactic consideration.
 There is no way for the programmer to provide an environment, and
 adding an interface to do so would be another complication.
 Without the environment, Alexandria doesn't know whether symbols
 are constant in the environment the parsed code will be used in.
3) Many uses of parsed lambda lists involve constancy checks anyway,
 e.g. if the variables are bound with LET most implementations will
 check.
parent 8514d8e6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -186,8 +186,7 @@ Signals a PROGRAM-ERROR is the lambda-list is malformed."
             (check-variable (elt what &optional (allow-specializers allow-specializers))
               (unless (and (or (symbolp elt)
                                (and allow-specializers
                                     (consp elt) (= 2 (length elt)) (symbolp (first elt))))
                            (not (constantp elt)))
                                     (consp elt) (= 2 (length elt)) (symbolp (first elt)))))
                 (simple-program-error "Invalid ~A ~S in ordinary lambda-list:~%  ~S"
                                       what elt lambda-list)))
             (check-spec (spec what)