[plt-scheme] macro-generating macros and the bizarre properties of syntax-local-get-shadower

From: Dimitris Vyzovitis (vyzo at media.mit.edu)
Date: Mon May 14 21:38:39 EDT 2007

On Tue, 15 May 2007, Matthew Flatt wrote:

> I looks like Ryan and I replied at about the same time. Read Ryan's
> first, and then read mine as an elaboration of this paragraph in Ryan's
> message:
> At Mon, 14 May 2007 18:19:58 -0400, Ryan Culpepper wrote:
> > When this macro is called, it looks up the value associated with 'foo1':
> > that's the number 1. Then it tries to turn it into an expression with
> > that quasisyntax business. But doing it that way doesn't give it a
> > '#%datum' binding, and that leads to the syntax error.

I understand the problem. I see it is an instance of the more general
problem of meta-level transformer environments.

It is utterly frustrating to see the dreaded "*** is not allowed because
no #%*** transformer is bound" message (it makes me want to shred my emacs
buffer in pieces every time I get one).  Perhaps a
require-for-phase/require-for-phase-template scheme will
eventually appear to remedy the situation (but it seems rather complicated
to do right and it I am not sure it is even the right thing to do;
unless there is a require-for-all-phases mechanism too).
A reasonable alternative may be to propagate the transformer environment
import bindings to the next phase by default.

-- vyzo

Posted on the users mailing list.