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: interate over the a public interface?



> I've got an interactive environment that I'd like to include lots of
> small modules into.  In otherwords, I'd like to have a module boot
> 
> (define-module (boot)
> 	       :use-module (mod1)
> 	       :use-module (mod2)
> 	       :use-module (mod3))
> 
> that I can include by saying
> 
> (use-module (boot))
> 
> and get the exports of mod1, mod2, &c.  
> 
> I've had some success with module-for-each, but it interates over all
> variables in a module (local and exported).  Is there a way to only
> iterate over the public interface?

This is a problem.  It's one of the reasons my environment proposal
instantiates export, eval, local, and import environments as distinct
objects.  Then you can use environment-fold (or whatever) and simply
apply it to the appropriate environment object to get the bindings you
care about.

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