[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(define-module (foo) #:import (...)), a la r6rs
From: |
Andy Wingo |
Subject: |
(define-module (foo) #:import (...)), a la r6rs |
Date: |
Thu, 28 Jul 2011 12:37:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Hi,
I was hacking on Dorodango today, in a script that happened to have a
Guile-style (define-module ...) block, and I was importing pieces of an
rnrs library. Then I needed to update the import set to provide what
was needed. In the middle of making a keyboard macro to add
#:use-module before the library names, I realized that `library' is
actually a lot better in this regard, in that you just have one `import'
block, and all the libraries are listed there without having a prefix on
each one.
So what do you all think about:
(define-module (foo)
#:import ((bar)
(only (baz) qux foo)
...))
Or even:
(define-module (foo)
(import (bar)
(only (baz) qux foo)
...))
We would continue to support the #:use-module syntax indefinitely, of
course.
It looks like the upcoming R7RS standard will support these import specs
in the same way as the r6rs, though without version specifiers
(thankfully).
Andy
--
http://wingolog.org/
- (define-module (foo) #:import (...)), a la r6rs,
Andy Wingo <=