[parenscript-devel] Need a meaningful error message when PS macro references unbound var
When a macroexpansion tries to evaluate an unbound variable, as in the following, (ps (macrolet ((blah () x)) (blah))) the resulting error message is unhelpful: "Attempt to take the car of "Unbound Value" which is not listp." Could it say "Attempt to take the value of the unbound variable X" instead? Daniel
The error given depends on your Lisp implementation. SBCL gives me: The variable X is unbound. [Condition of type UNBOUND-VARIABLE] However, this does highlight a very interesting point I didn't realize before: ParenScript macroexpansion does take place in the Lisp environment, so there could be unintended "leaks" between the two this way. For example: (defvar *foo* 123) (ps (macrolet ((blah () *foo*)) (blah))) => "123; " Which may or may not be what you want. Vladimir On 9/13/07, Daniel Gackle <danielgackle@gmail.com> wrote:
When a macroexpansion tries to evaluate an unbound variable, as in the following,
(ps (macrolet ((blah () x)) (blah)))
the resulting error message is unhelpful: "Attempt to take the car of "Unbound Value" which is not listp."
Could it say "Attempt to take the value of the unbound variable X" instead?
Daniel
_______________________________________________ parenscript-devel mailing list parenscript-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
participants (2)
-
Daniel Gackle
-
Vladimir Sedach