[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] ANN: first draft of R7RS small language available
- To: Alex Shinn <alexshinn@x>
- Subject: Re: [Scheme-reports] ANN: first draft of R7RS small language available
- From: Andre van Tonder <andre@x>
- Date: Mon, 18 Apr 2011 10:50:20 -0400 (EDT)
- Cc: scheme-reports@x
- In-reply-to: <BANLkTi=dC4Xns4WT5bMxGcVPnuCYgaWpJA@mail.gmail.com>
- References: <BANLkTi=hSfKrHo13BUMP==SNPCX-+As0HQ@mail.gmail.com> <BANLkTi=kSqWZpF-fAPObreiuAf9FxPb85w@mail.gmail.com> <BANLkTik2QF-u=58SLtQDTTWnx6htQxhqXA@mail.gmail.com> <op.vt067uor0p3ku8@localhost> <BANLkTin8_pPvE89bWzcnJ6d_EU=AcLCD=A@mail.gmail.com> <op.vt1mv2c90p3ku8@localhost> <BANLkTi=dC4Xns4WT5bMxGcVPnuCYgaWpJA@mail.gmail.com>
On Mon, 18 Apr 2011, Alex Shinn wrote:
> On Sun, Apr 17, 2011 at 3:27 AM, Aaron W. Hsu <arcfide@x> wrote:
>> Alex:
>>
>>> Is there actually any implementation for which this could
>>> be a problem?
>>
>> Chez Scheme has this problem specifically. If you create a library that
>> exports a macro using an auxiliary keyword, but do not explicitly export
>> that keyword, then the implicit binding in the REPL is different than the
>> absent binding in the library, meaning that the keywords do not match, and
>> making the macro fail to work. On the other hand, if you use that macro in a
>> library where the term is unbound, then the macro will work as anticipated,
>> because the call site and the definition site both lack a binding for the
>> identifier.
>
> Is this inherent in the psyntax expander? I'd like to see the
> source that results in this behavior to be convinced it can't
> easily be fixed.
It can easily be fixed by binding the keyword in the exporting library and
exporting and importing the keyword. This is what has been done for many years
in Chez, Larceny, and PLT.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports