mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-30 00:40:20 +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:
parent
f2d126801c
commit
d9b1c71ac6
2 changed files with 3 additions and 2 deletions
|
@ -3326,7 +3326,7 @@ module '(ice-9 q) '(make-q q-length))}."
|
||||||
(syntax-case x ()
|
(syntax-case x ()
|
||||||
((_ (name name* ...) arg ...)
|
((_ (name name* ...) arg ...)
|
||||||
(with-syntax (((quoted-arg ...) (quotify #'(arg ...))))
|
(with-syntax (((quoted-arg ...) (quotify #'(arg ...))))
|
||||||
#'(eval-when (eval load compile)
|
#'(eval-when (eval load compile expand)
|
||||||
(let ((m (process-define-module
|
(let ((m (process-define-module
|
||||||
(list '(name name* ...) quoted-arg ...))))
|
(list '(name name* ...) quoted-arg ...))))
|
||||||
(set-current-module m)
|
(set-current-module m)
|
||||||
|
|
|
@ -178,7 +178,8 @@
|
||||||
...
|
...
|
||||||
(re-export r ...)
|
(re-export r ...)
|
||||||
(export e ...)
|
(export e ...)
|
||||||
body ...))))))))
|
(@@ (name name* ...) body)
|
||||||
|
...))))))))
|
||||||
|
|
||||||
(define-syntax import
|
(define-syntax import
|
||||||
(lambda (stx)
|
(lambda (stx)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue