reexport doesn't work with `((foo bar))' style macro export declarations
Everything seems to work if all the modules are in the same file, but doesn't if they are compiled separately.
File: ./csi-output
-----
; loading poi.scm ...
; loading ./m2.import.scm ...
[ ... ]
; loading ./m.import.scm ...
; loading ./m2.so ...
; loading ./m.so ...
Error: unbound variable: bar
Call history:
<eval> (list)
<eval> (list (cons (quote baz) (ir-macro-transformer (lambda (e i c) (quasiquote (foo))))) (quote foo) (quo......
<eval> (cons (quote baz) (ir-macro-transformer (lambda (e i c) (quasiquote (foo)))))
<eval> (ir-macro-transformer (lambda (e i c) (quasiquote (foo))))
<eval> (list)
<syntax> (##core#undefined)
<syntax> (##core#undefined)
<eval> (##sys#require (quote m2))
src/m2.scm:5: ##sys#require
<syntax> (print (baz))
<syntax> (baz)
<eval> (##sys#list (##core#quote foo))
<eval> (##sys#list (##core#quote bar))
<syntax> (bar30)
<eval> (print (baz))
<eval> (bar30) <--
File: ./run.sh
-----
set -ex
rm -f *.so *.import.scm *.o poi
csc -J -s src/m.scm
mv src/*.so .
csc -I . -J -s src/m2.scm
mv src/*.so .
csc poi.scm
./poi
File: ./poi.scm
-----
(use m2)
(print (baz))
File: ./output
-----
+ rm -f m2.so m.so m2.import.scm m.import.scm '*.o' poi
+ csc -J -s src/m.scm
+ mv src/m.so .
+ csc -I . -J -s src/m2.scm
+ mv src/m2.so .
+ csc poi.scm
+ ./poi
Error: unbound variable: bar
Call history:
poi.scm:1: ##sys#require
src/m2.scm:5: ##sys#require
poi.scm:2: bar <--
File: ./src/m.scm
-----
(module
m
((foo bar)) ; changing this to (foo bar) makes it work
(import chicken scheme)
(define (bar) 1)
(define-syntax foo
(ir-macro-transformer
(lambda (e i c)
`(bar)))))
File: ./src/m2.scm
-----
(module
m2
(baz)
(import chicken scheme)
(use m)
(reexport m)
;; uncommenting these does not seem to make big difference
;; (import-for-syntax m)
;; (begin-for-syntax (require-library m))
(define-syntax baz
(ir-macro-transformer
(lambda (e i c)
`(foo)))))
Milestone 4.8.0 deleted