Summary
reexport doesn't work with `((foo bar))' style macro export declarations
Metadata
- Id: c31db7dde46884d0cba13351f26b203e0a4d6512
- Trac id: 900
- Type: defect
- Reporter: megane
- Owner: felix
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.8.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2012-08-17 11:43:52 UTC
- Keywords: modules
Attachments
- c31db7dde46884d0cba13351f26b203e0a4d6512/attachments/reexport-bug.tar
Description
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)))))
Changes and comments
[2012-08-17 11:44:22 UTC] megane attached reexport-bug.tar (description=#f)
[2012-08-18 15:26:42 UTC] felix changed status from new to assigned
[2012-08-18 15:26:42 UTC] felix set owner to felix
[2012-08-28 21:19:34 UTC] felix changed status from assigned to closed
[2012-08-28 21:19:34 UTC] felix set resolution to fixed
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted