1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 16:00:22 +02:00

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.
This commit is contained in:
Andy Wingo 2010-05-06 22:34:36 +02:00
parent f2d126801c
commit d9b1c71ac6
2 changed files with 3 additions and 2 deletions

View file

@ -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)

View file

@ -178,7 +178,8 @@
...
(re-export r ...)
(export e ...)
body ...))))))))
(@@ (name name* ...) body)
...))))))))
(define-syntax import
(lambda (stx)