[R6RS] Unbound variables

dyb at cs.indiana.edu dyb at cs.indiana.edu
Tue Mar 7 14:00:52 EST 2006

> (syntax-rules (foo)
>   ...)
> does `foo' (whose binding matters) need to be bound?

Probably not.  I don't consider foo above a reference to foo, nor would I
consider an occurrence of foo where the macro looks for it in the input to
be a reference to foo.  It's simply a feature of the macro's syntax.  In
terms of matching foo against the input, we need to consider how literals
are matched.  Literals in both Chez Scheme and MzScheme match if they have
the same binding, and two identifiers are considered to have the same
binding if they have the same name and are both unbound.  Even if they are
bound, we don't need to know what kind of thing they are bound to (which
is a strangeness of literals, to be sure), just that they have the same
binding, whatever it is.


More information about the R6RS mailing list