[r6rs-discuss] Comments on syntax-rules

David Van Horn dvanhorn at cs.brandeis.edu
Wed Nov 1 15:20:19 EST 2006


A few notes and questions on syntax-rules:

1) With the addition of <fenders> into the language of syntax-rules, the 
following no longer seems true:

- a facility (syntax-case; see chapter 17) for creating
transformers via a pattern language that permits the
use of arbitrary Scheme code, and a derived facility
(syntax-rules; see section 9.21) for creating transformers
via the pattern language only.

Since <fender> may make use of arbitrary Scheme code.

2) Why not make syntax-rules evaluate to a transformer procedure? This 
is common among R5RS implementations that support syntax-case, where 
they often use the definition of syntax-rules from TSPL:

(define-syntax syntax-rules
   (lambda (x)
     (syntax-case x ()
       ((_ (i ...) ((keyword . pattern) template) ...)
        (syntax (lambda (x)
                  (syntax-case x (i ...)
                    ((dummy . pattern) (syntax template))
                    ...)))))))

This would make some of the language surrounding define-, let-, and 
letrec-syntax clearer.  For example, it would seem that syntax-rules 
transformers are disallowed in (r6rs syntax-case) because "A



More information about the r6rs-discuss mailing list