This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: module interface changed or changing?


> On Tue Jun 16, Clark McGrew <mcgrew@sukat.icrr.u-tokyo.ac.jp> wrote:
> 
> I do have a very short wish-list which can be implemented as a very
> short macro: Add "export-from-module" which takes a list of names and
> does "(define-public <name> #f)" to export the names, then a regular
> "define" can be used everyplace else.  This makes it really trivial to
> wrap existing scheme code in a guile module.  If the current module
> system is not DOA, I'll submit an "export-from-module" patch.
> 

This would be a giant step forward. I tried something similar, but couldn't
get it to work with define _and_ defmacro. With the present module system,
I have no idea how I could for example define new syntax with define-syntax
and export that definition.

As I see it, a module system should regulate visibility of names,
independent of what they're bound to. That's why I don't like the
distinction between define-public and defmacro-public in the current
system. 

Here's my wish-list for a module system:
(1) Make names available outside of module with an export clause instead of
different define/defmacro
(2) Allow selective imports from a module
(3) Allow renaming of imported names

Maybe all this can be done with the current module system already ... I'm
not an expert. I do like Scheme48's module system (Jonathan Rees: Another
Module System for Scheme) a lot better than the current one. Has anybody
ported that to Guile already ?

David