On Thu, 17 Sep 2009, Andrew Reilly wrote:
> On Thu, Sep 17, 2009 at 07:02:19AM -0400, Andre van Tonder wrote:
>>
>> Again, as I have said many times and even explained with examples, I am not
>> contesting the visibility rules at the toplevel for macros. In the following
>> toplevel sequence typed at a REPL
>>
>> (m)
>> (define-syntax m (syntax-rules ((_) .....)))
>>
>> I /agree/ that M is lexically VISIBLE in the first line.
>> But I /disagree/ that M should yet be bound to the macro when the first line
>> is expanded.
>
> How could it be? Haven't you just been given an "undefined
> identifier" or "unbound variable" error after the first
> [return]?
You are confusing visibility with extent. Consider in R6RS
(let ()
(define y x)
(define x 1)
....)
Here the region of visibility of the x binding is the entire body, but
the above is still an error, because the reference to x in the
first definition is not within the dynamic extent of the binding.
Andre
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss