At Mon, 06 Jul 2015 23:24:20 -0400, Ryan Culpepper wrote:
> On 07/06/2015 10:04 PM, Anthony Carrico wrote:
> > I've been working through Macros that Work Together (on my way to
> > working through Sets-of-Scopes). I've come across something that is
> > slightly unclear to me in the section on local-expand:
> >
> > E ::= a mapping from name to transform
> >
> > I don't believe that E is a stack (right?). If it isn't, then in
> > jfp12-draft2-fcdf.pdf page 26:
> >
> > nostops[E]={var->transform | E(var) = transform and transform != Stop}
> >
> > Estops = nostops[E]+{resolve[idstop]->Stop} ...
> >
> > This will clear out the stops of the outer macro and then install the
> > stops of the inner macro. My concern is that nostops does nothing to
> > reinstall the original transformers of the cleared stops. Shouldn't it?
>
> If I remember correctly, nostops does in fact depend on the definition
> of environments as alists, so when the Stop binding is removed, the
> previous binding becomes visible again. You can get the actual redex
> models behind the paper here:
>
> http://www.cs.utah.edu/plt/expmodel-6/
(And that demonstrates a hazard of providing a custom typesetting rule
with Redex!)
In case it's useful, the set-of-scopes model avoids this mistake by
having `Stop` record the previous transformer value. Then, the `unstop`
metafunction (instead of `nostops`) can restore it:
http://www.cs.utah.edu/~mflatt/scope-sets-5/model.html#%28part._.Local_.Expansion%29
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.