diff --git a/expand.scm b/expand.scm
index 660d1fa..ce03c31 100644
a
|
b
|
|
40 | 40 | |
41 | 41 | (include "common-declarations.scm") |
42 | 42 | |
43 | | (define-syntax d (syntax-rules () ((_ . _) (void)))) |
| 43 | ;(define-syntax d (syntax-rules () ((_ . _) (void)))) |
44 | 44 | |
45 | 45 | (set! ##sys#features |
46 | 46 | (append '(#:hygienic-macros |
diff --git a/modules.scm b/modules.scm
index 078da0d..40c935b 100644
a
|
b
|
|
170 | 170 | exps) |
171 | 171 | (set-module-sexports! mod (append sexps (module-sexports mod))) |
172 | 172 | (set-module-exist-list! mod (append el exps))) |
173 | | (set-module-export-list! |
174 | | mod (append xl exps))))) |
| 173 | (set-module-export-list! mod (append xl exps))))) |
175 | 174 | |
176 | 175 | (define (##sys#toplevel-definition-hook sym mod exp val) #f) |
177 | 176 | |
… |
… |
|
704 | 703 | (when reexp? |
705 | 704 | (unless cm |
706 | 705 | (##sys#syntax-error-hook loc "`reexport' only valid inside a module")) |
707 | | |
708 | | (if (eq? #t (module-export-list cm)) |
709 | | (begin |
710 | | (set-module-exist-list! |
711 | | cm |
712 | | (append (module-exist-list cm) |
713 | | (map car vsv) |
714 | | (map car vss)))) |
715 | | (set-module-export-list! |
716 | | cm |
717 | | (append |
718 | | (let ((xl (module-export-list cm) )) |
719 | | (if (eq? #t xl) '() xl)) |
720 | | (map car vsv) |
721 | | (map car vss)))) |
| 706 | (let ((el (module-export-list cm))) |
| 707 | (cond ((eq? #t el) |
| 708 | (set-module-sexports! cm (append vss (module-sexports cm))) |
| 709 | (set-module-exist-list! |
| 710 | cm |
| 711 | (append (module-exist-list cm) |
| 712 | (map car vsv) |
| 713 | (map car vss)))) |
| 714 | (else |
| 715 | (set-module-export-list! |
| 716 | cm |
| 717 | (append |
| 718 | (let ((xl (module-export-list cm) )) |
| 719 | (if (eq? #t xl) '() xl)) |
| 720 | (map car vsv) |
| 721 | (map car vss)))))) |
722 | 722 | (when (pair? prims) |
723 | 723 | (set-module-meta-expressions! |
724 | 724 | cm |
diff --git a/tests/reexport-tests.scm b/tests/reexport-tests.scm
index 892ad64..651ed47 100644
a
|
b
|
|
36 | 36 | (module m3 () |
37 | 37 | (import scheme big-chicken) |
38 | 38 | (pp (string-intersperse '("abc" "def" "ghi") "-"))) |
| 39 | |
| 40 | ;;; #901 - reexport with "*" export list |
| 41 | |
| 42 | (module |
| 43 | m4 |
| 44 | (foo-m4) |
| 45 | (import chicken scheme) |
| 46 | (define-syntax foo-m4 |
| 47 | (ir-macro-transformer |
| 48 | (lambda (e i c) |
| 49 | ''1)))) |
| 50 | |
| 51 | (module |
| 52 | m5 |
| 53 | * ; () works here |
| 54 | (import chicken scheme) |
| 55 | (reexport m4)) |
| 56 | |
| 57 | (import m5) |
| 58 | (print (foo-m4)) |