diff options
author | Andy Wingo <wingo@pobox.com> | 2010-05-06 22:34:36 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-05-06 22:42:44 +0200 |
commit | d9b1c71ac61b9e510ff0e2ce819e4002348eceb6 (patch) | |
tree | 306531f48eec18b62c2b519f6aa32c0e1f9bf7bc | |
parent | f2d126801cf37bb49006ac1252045ddea2e9cc31 (diff) | |
download | guile-d9b1c71ac61b9e510ff0e2ce819e4002348eceb6.tar.gz |
fix macros that expand into (begin (define-module ...) ...)
* module/ice-9/boot-9.scm (define-module): Add `expand' to the
situations, so that we ensure the current module changes at expand
time.
* module/ice-9/r6rs-libraries.scm (library): Expand the body within @@
expressions.
-rw-r--r-- | module/ice-9/boot-9.scm | 2 | ||||
-rw-r--r-- | module/ice-9/r6rs-libraries.scm | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index c1a944763..794e92999 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -3326,7 +3326,7 @@ module '(ice-9 q) '(make-q q-length))}." (syntax-case x () ((_ (name name* ...) arg ...) (with-syntax (((quoted-arg ...) (quotify #'(arg ...)))) - #'(eval-when (eval load compile) + #'(eval-when (eval load compile expand) (let ((m (process-define-module (list '(name name* ...) quoted-arg ...)))) (set-current-module m) diff --git a/module/ice-9/r6rs-libraries.scm b/module/ice-9/r6rs-libraries.scm index dc77ee695..14c89d01e 100644 --- a/module/ice-9/r6rs-libraries.scm +++ b/module/ice-9/r6rs-libraries.scm @@ -178,7 +178,8 @@ ... (re-export r ...) (export e ...) - body ...)))))))) + (@@ (name name* ...) body) + ...)))))))) (define-syntax import (lambda (stx) |