On Sat, 2009-09-12 at 12:06 -0700, Joe Marshall wrote:
> On Thu, Sep 10, 2009 at 4:23 PM, Ray Dillinger <[email protected]> wrote:
>
> > +1. For debugging purposes, redefinition of macro forms *should*
> > cause all the call sites for that macro to be re-expanded.
>
> Including those macros that were used in the implementation of
> the macro expander?
Yes, but ordinarily the macros that the macro-expander depends on
should not be in the same scope as any user-defined code. You
can shadow them with local syntax definitions having the same names,
of course, but changing those wouldn't change the way the macro
expander behaves.
Firstly, you should be unable to alter the definitions of syntax
you haven't defined in the current library, the same as you aren't
able to alter function (or other variable) bindings defined outside
the current library.
Second, unless you've defined the macro-expander in the current
library or unless the library in which the macro-expander is
defined imports syntax from the current library (which is almost
certainly not the case if you're talking about the implementation-
provided macro expander) then redefinitions of syntax defined
in the current library should not affect the semantics of the
macro-expander.
It's the same scope rule you have about changing (a local definition
of) 'cdr' not altering the semantics of other implementation-provided
functions like 'length.'
Bear
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss