~ chicken-core (chicken-5) /tests/renamed-reexport-bug.scm


 1;;;; this-works.scm
 2
 3
 4;; when using import-libraries, then this fails:
 5;; 
 6;; (import foo2)
 7;; (fbar)           ; <- expansion refers to `bar'
 8
 9
10(module foo (bar baz)
11(import scheme)
12
13(define-syntax bar
14  (syntax-rules () ((_) (baz))))
15
16(define-syntax baz
17  (syntax-rules () ((_) (display "baz.\n")))))
18
19(module foo2 ()
20(import scheme)
21(reexport (rename foo (bar fbar) (baz fbaz))))
22
Trap