[r6rs-discuss] Question about "expand time" vs. "execution time"

Abdulaziz Ghuloum aghuloum at cs.indiana.edu
Sun May 27 21:31:25 EDT 2007


On May 27, 2007, at 9:23 PM, John Cowan wrote:

> Brian C. Barnes scripsit:
>
>> (define-syntax ttf
>
> [...]
>
>> (bProc ttf)
>
> That's a reference to an undefined variable "ttf", which has  
> absolutely
> nothing to do with the syntax identifier "ttf".

Actually, that's a syntax violation (or something like that) since
ttf does not (and cannot) match any of the rules in
(define-syntax ttf
   (syntax-rules ()
     ((_) #f)
     ((_ var) var)
     ((_ var1 var2) (+ var1 var2))))

It is possible, however, to use syntax-case or identifier-syntax
to expand ttf to something else.

Aziz,,,



More information about the r6rs-discuss mailing list