unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* use-modules: selecting, which symbols not to load
@ 2012-12-27  3:43 Panicz Maciej Godek
  2012-12-27  8:31 ` Thien-Thi Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Panicz Maciej Godek @ 2012-12-27  3:43 UTC (permalink / raw)
  To: guile-user

Hey,
I've been thinking about the ways `use-modules` can be used.
Namely, one can import selected symbols from a module, and
additionally can rename specified symbols.

What I've been lacking is specifying symbols that are NOT meant
to be imported from a module.
So I'd wish to be able to load modules in the following manner:

(use-modules ((rnrs) #:version (6) #:without (write display)))

I think it can sometimes be desirable to import the whole public
interface except certain bindings. Of course, similar effect could
be worked around by writing a smart renamer, such as
(use-modules ((rnrs) #:version (6)
  #:renamer (lambda(name)
                     (if (or (equal? name 'write) (equal? name 'display))
                        (symbol-append 'unused: name)
                        name)))

but it's much more complicated, and it creates some unnecessary
garbage. If I really wanted to exclude those two symbols, I'd need
to import all the remaining symbols from the module, which would
be bothersome and require me to change my header as the module
changes.
Or maybe there is an easy way to exclude certain symbols from
import-list?

Best regards!



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-06 10:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-27  3:43 use-modules: selecting, which symbols not to load Panicz Maciej Godek
2012-12-27  8:31 ` Thien-Thi Nguyen
2012-12-28  0:05   ` Panicz Maciej Godek
2012-12-28  4:34 ` Mark H Weaver
2012-12-29 12:18   ` Panicz Maciej Godek
2012-12-30 21:08   ` Ludovic Courtès
2012-12-31 16:38     ` Mark H Weaver
2013-01-06 10:56 ` Ian Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).