On Nov 11, 2008, at 4:12 AM, marcomaggi wrote:
So it seems that macros at 'expand' time have access
to all the bindings that will be available at 'run'
time in the region of a macro use.
There might be different regions at the macro use
with different bindings.
Informations about
those bindings is stored somehow in MACRO-USE-STX.
It is stored in the "identifiers" in macro-use-stx.
But why the context that DATUM->SYNTAX needs to query
the available bindings has to be '(syntax use)' or
'(syntax ?arg)' when ?ARG is a literal and not
MACRO-USE-STX itself?
Because datum->syntax takes an identifier as first
argument and macro-use-stx is not an identifier.
The macro-use-stx list might contain two identifiers
from two different scopes. The expander wouldn't
know which one you mean.
And why the context is not
implicit, as if the <syntax-case clause>s are evaluated
in a:
(parameterize ((macro-use-context MACRO-USE-STX))
---)
form?
It is useful to be able to destructure arbitrary
syntax objects using syntax-case. It should not
be tied to one particular input.
Aziz,,,