1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 16:50:21 +02:00

Ignore explicit phase specification for imports in `library' form.

* module/ice-9/r6rs-libraries.scm (library): Unwrap the `for' sub-form
  during export resolution the same way that `import' does.
* test-suite/tests/rnrs-libraries.test ("implicit phasing"): New test
  prefix and tests.
This commit is contained in:
Julian Graham 2010-05-27 21:32:20 -04:00
parent 853cb35661
commit 04186f2006
2 changed files with 23 additions and 2 deletions

View file

@ -161,8 +161,14 @@
(and-map identifier? #'(name name* ...))
(call-with-values
(lambda ()
(compute-exports (map resolve-r6rs-interface #'(ispec ...))
#'(espec ...)))
(compute-exports
(map (lambda (im)
(syntax-case im (for)
((for import-set import-level ...)
(resolve-r6rs-interface #'import-set))
(import-set (resolve-r6rs-interface #'import-set))))
#'(ispec ...))
#'(espec ...)))
(lambda (exports re-exports)
(with-syntax (((e ...) exports)
((r ...) re-exports))