[plt-scheme] transformer environment and identifier-binding
Matthew Flatt writes:
> At Sun, 21 Mar 2004 02:53:46 -0500, Doug Orleans wrote:
> > This is a contrived example, but I'm running into this problem when
> > using `syntax-case' in a required-for-syntax module: it can't detect
> > `lambda' in a syntax object, because it's not `module-identifier=?' to
> > the `lambda' that appears in the literal list (because that `lambda'
> > is a free identifier). If I copy the `syntax-case' expression directly
> > into the transformer expression, it works fine, but isn't the point of
> > `require-for-syntax' that I should be able to put it into a module
> > instead?
>
> This is a common problem. When an imported function needs to compare
> identifiers to some constant, one option is to pass the constant into
> the helper function (because the caller has a suitable binding).
I was thinking about doing this, but doesn't this mean I can't use
`syntax-case'? It requires the constant identifiers to be provided
inline. I think what I really need is something like
`module-identifier=module-transformer-identifier?' but I have no idea
how to write it...
--dougo at place.org