[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

syntactic tower?

This page is part of the web mail archives of SRFI 83 from before July 7th, 2015. The new archives for SRFI 83 contain all messages, not just those from before July 7th, 2015.



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)