[parenscript-devel] Macro symbols affect GENSYMing in LET

Vladimir Sedach vsedach at gmail.com
Mon Jun 8 05:28:36 UTC 2009


Fixed.

On Thu, Jun 4, 2009 at 11:10 AM, <sblist at me.com> wrote:
> I haven't done a very good job of distilling down this bug,
> but we're experiencing an issue with the GENSYMing
> done by LET in the presence of macros with the same
> names as variables bound in LET.
>
> This is the simplest example I could come up with:
>
>  > (ps
>             (macrolet ((a (n) `(+ ,n 5)))
>               (let ((a (a 1)))
>                 (let ((b (a (- a 4))))
>                   (+ a b)))))
> "var a1661 = 1 + 5;
> var b = (a - 4) + 5;
> a1661 + b;"
>
> You can see here that the symbol A is GENSYM'd since
> it occurs elsewhere in the LET binding forms, but it seems
> to be missed in the inner LET form. If the symbol A is not
> inside the subtraction form, it is caught:
>
>  > (ps
>             (macrolet ((a (n) `(+ ,n 5)))
>               (let ((a (a 1)))
>                 (let ((b (a a)))
>                   (+ a b)))))
> "var a1662 = 1 + 5;
> var b = a1662 + 5;
> a1662 + b;"
>
> - Scott
>
> _______________________________________________
> 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