[plt-scheme] Macro question
At Sat, 24 May 2003 15:57:45 -0500, David Van Horn wrote:
> > This error message should be really read as "macro messed with the hygiene;
> > the module system detects that the author got the hygiene marks wrong" ;)
>
> Although I sometimes see this error message even when I'm not messing with
> hygiene.
>
> Eg.
>
> (define-syntax id
> (let-syntax ((never-used (syntax-rules ())))
> (syntax-rules ()
> ((_ e) e))))
>
> compile: bad syntax; function application is not allowed, because no #%app
> syntax transformer is bound in: (syntax-rules ())
>
> Is this a bug perhaps? Scheme48 happens to accept it.
It's not a bug. In the same way that MzScheme distinguishes the set of
bindings available for run-time expressions from those available for
compile-time expressions, it also distinguishes bindings for compile
time from bindings for compile-compile time.
Within a run-time expression, `let-syntax' introduces compile-time
expressions for its bindings. Within a compile-time expression,
`let-syntax' introduces compile-compile-time expressions for its
bindings.
Currently, MzScheme offers no way to put bindings into the
compile-compile-time environment --- not even procedure application.
Matthew