Fri Apr 24 09:27:24 CEST 2009

Hygiene: syntax-case & introduced identifiers

A good thing about syntax-case is that it can introduce identifiers
whenever a quoted syntax object does not refer to a pattern variable.
However, if such a symbol is is a reference position, you will find
out only at expansion time of the macro that the identifier is not

Why is this?  Why can't this be known at macro compile time (i.e. the
for-template includes should have it, no?)

Is this because the compiler can't know whether the identifier is in a
binding position (in which case it is legal) or a reference position
(in which case it needs to be defined in the context in which the
macro is expanded) ?