On Sep 14, 2009, at 12:06 AM, Andre van Tonder wrote:

> Ah, the way it is done in my expander is by keeping, for every body,
> a list of identifiers whose denotations have affected expansion of
> th body so far.  If a definition is encountered, the LHS identifier
> is compared against this list, and if its denotation has already
> been used to affect the body expansion so far, an error is raised.

Sorry.  I guess my question isn't clear.  Let me try something else.

In this one-pass expansion, do you think it's possible to expand

(let ([f (lambda () 1)])
   (let ()
     (define (g) (f))
     (define (f) 2)
     (g)))

to something like

(let ([f0 (lambda () 1)])
   (letrec* ([g1 (lambda () (f1))]
             [f1 (lambda () 2)])
     (g1))

directly (i.e., without uncovering all internally-defined identifiers
first, and without doing a second renaming pass)?

If so, how?

Aziz,,,

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to