[r6rs-discuss] [Formal] Internal define-syntax lexical scoping violation
On Tue, 24 Oct 2006, Abdulaziz Ghuloum wrote:
> No. Multipass expansion, as you describe it, is ambiguous. Suppose that I
> change your example slightly so that the outer bar is a macro (defined
> externally), not a lexical variable:
>
> (let ()
> (bar x)
> (define-syntax bar
> (syntax-rules ()
> ((bar x) (define x 1))))
> x)
What I had in mind was a fixpoint of the current expansion algorithm. So this
would still be an error by the first paragraph of p.28, whereas my original
example is not currently covered by this paragraph.
> PS: Did you implement this algorithm?
No. I might play with it, but there may be other ways to fix the issue (I would
probably be okay with an error being thrown of the type of p.28, just not the
"expression before definition" error one would currently get, which is
inconsistent with lexical scoping). Maybe the algorithm in the first paragraph
of p.28 can be fixed to detect this problem also.
Andre
Received on Tue Oct 24 2006 - 10:57:31 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC