[plt-scheme] macro-generating macros and the bizarre properties of syntax-local-get-shadower
On Mon, 14 May 2007, [UTF-8] Jens Axel Søgaard wrote:
> Dimitris Vyzovitis skrev:
> > On Mon, 14 May 2007, [ISO-8859-1] Jens Axel S�gaard wrote:
> >
> > Well, the issue is the crash with no bindings at the meta-transformer
> > environment and how it goes away with syntax-local-get-shadower. Your
> > version is nice and clean, but it is not always appropriate. There are
> > cases where you really do need quasisyntax and unquotes; the purpose of
> > the rather contrived example was to demonstrate this mystery that baffled
> > me...
>
> Well, I hadn't figured out why the above didn't work. So it was just
> as much so show that the basic principle worked.
>
> By replacing foov with 42, I found out which expression
> the error stemmed from. Since the problem consists of #%datum
> being unbound, I added a (datum->syntax-object #'here ...)
> in order to make sure #%datum is bound.
Heh. That's quite a hack...
It still doesn't explain the syntax-local-get-shadower business (and
really, why does the hack even work?)
>
> I *think* (but I'm not sure) the reason #%datum is not
> bound, is that #%datum isn't bound in the syntax-syntax-environment.
> And *think* there currently are no operations to import
> bindings to the syntax-syntax-environment.
Of course. Frustrating beyond words.
-- vyzo