[Snow-users-list] Transitivity of "require" for macros

François Magnan francois.magnan at licef.ca
Thu Dec 20 16:25:21 EST 2007


I suspect a bug in snow (maybe I am wrong) but let's say I have 3  
snowballs (dummies for my explanation):

===== moda.scm ======
(package* moda/v1.0.0
     (define (square x))
     (define-macro (add x y)
       `(+ ,x ,y))))

(define (square x) (* x x))

===== modb.scm ======
(package* modb/v1.0.0
    (provide: (define (power4 x)))
    (require: moda/v1))

(define (power4 x) (* (square x) (square x)))

(write (add 1 2))

===== modc.scm ======
(package* modc/v1.0.0
    (provide: (define (power6 x)))
    (require: modb/v1))

(define (power6 x) (* (square x) (square x) (square x)))

(write (power6 12))

(write (add 1 2))


Then I type:

snow -- modb/v1.0.0/snow/modb.scm

which is what I expected. And then I type:

snow -- modc/v1.0.0/snow/modc.scm
*** ERROR IN "modc/v1.0.0/snow/modc.scm"@10.9 -- Unbound variable:  

which is NOT what I expected. It seems that macros are not  
transitively transported through dependencies. Normal functions are.  
Is this a bug?

Thank you,
Francois Magnan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://webmail.iro.umontreal.ca/pipermail/snow-users-list/attachments/20071220/4a007645/attachment.html 

More information about the Snow-users-list mailing list