syntactic tower? Andre van Tonder 30 Nov 2005 19:16 UTC

Thank you for the proposal.

I have the following remark:  The current syntax seems to allow import
only for runtime and expand-time.  It does not seem to distinguish the
meta-phases that occur when LET-SYNTAX is nested, and does not appear
to be cleanly extensible to support these in future.

In particular, is it possible to express the following, copied from the
proposal at http://www.het.brown.edu/people/andre/macros/index.htm
(using the syntax of the latter)?

  (module m (x)
    (define x 1))

  (module n (x)
    (define x 2))

  (module o (x)
    (define x 3))

  (module p ()
    (import m)                       ; imports x = 1 into ground level
    (begin-for-syntax (import n))    ; imports x = 2 into meta-level
    (begin-for-syntax
      (begin-for-syntax (import o))) ; imports x = 3 into meta-meta-level

    (let-syntax ((foo (lambda (form)
                        (let-syntax ((bar (lambda (form)
                                            (quasisyntax
                                              (quasisyntax (list x ,x ,,x))))))
                           (bar)))))
       (display (foo))))

   (import p)  ==> (1 2 3)