[parenscript-devel] Need a meaningful error message when PS macro references unbound var

Vladimir Sedach vsedach at gmail.com
Thu Sep 20 23:56:16 UTC 2007


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 at 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 at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
>



More information about the parenscript-devel mailing list