[parenscript-devel] Bug: macroexpansion broken by lexical scoping change
Vladimir Sedach
vsedach at gmail.com
Sun May 10 03:04:22 UTC 2009
Start with a clean Lisp image or set *ps-macro-toplevel* to an empty
hash table - that error is due to the fact that the PS internal macro
representations have changed.
Vladimir
On Sat, May 9, 2009 at 8:40 PM, Daniel Gackle <danielgackle at gmail.com> wrote:
> Given the recent bug fixes, I tried to upgrade PS again. I'm now
> encountering an error on trying to expand a simple loop form. The error
> appears in commit 5a69278.
>
> (ps-macroexpand '(loop for x from 1 below 10 do (bah)))
>
> =>
> (NIL . #<Anonymous Function #x300042319FEF>) is not of type (OR
> SYMBOL
> FUNCTION), and
> can't be FUNCALLed or APPLYed
> [Condition of type TYPE-ERROR]
>
> Daniel
>
> On Sat, May 9, 2009 at 5:29 PM, Vladimir Sedach <vsedach at gmail.com> wrote:
>>
>> Just pushed out a patch that fixes this. The solution turned out to be
>> a lot more involved than I originally suspected - basically the PS
>> compiler had to be refactored to give control of macroexpansion over
>> to special forms (the way it was previously handling macroexpansion
>> was quite naive, but would have been suitable for a single-namespace
>> Lisp).
>>
>> The changes that have been going on in the recent while are starting
>> to make Parenscript almost look like a "real Lisp compiler."
>>
>> Vladimir
>>
>> On Wed, May 6, 2009 at 2:00 PM, Daniel Gackle <danielgackle at gmail.com>
>> wrote:
>> > Here's one thing that the latest PS breaks in our code.
>> >
>> > (ps (list 1 2 3))
>> > =>
>> > "[1,2,3];"
>> >
>> > (ps (let ((list nil))
>> > (setf list (list 1 2 3))))
>> > =>
>> > "var list5180 = null;
>> > list5180 = list5180(1, 2, 3);"
>> >
>> > I think this behavior is incorrect. It is quite surprising for a lexical
>> > variable to shadow a macro definition.
>> >
>> > Daniel
>> >
>> > _______________________________________________
>> > parenscript-devel mailing list
>> > parenscript-devel at common-lisp.net
>> > http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>> >
>> >
>>
>> _______________________________________________
>> parenscript-devel mailing list
>> parenscript-devel at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
>
> _______________________________________________
> 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