Kevin Ryde <[EMAIL PROTECTED]> writes: > Greg Troxel <[EMAIL PROTECTED]> writes: > > > > (define-module (ice-9 slib) > > :export (slib:load > > implementation-vicinity > > library-vicinity > > home-vicinity > > scheme-implementation-type > > scheme-implementation-version > > I would worry very much that these are specific to slib, and when it > adds a few more the module will stop working. The addition of new > stuff in slib was what broke the existing ice-9/slib.scm.
You are right, but if you object to going from what we have to what I posted, I don't see your point. The current ice-9/slib.scm is tied to specific slib versions. If you are feeling that integrating slib into a module system is messy, then I agree. sorry if i'm being redundant here: Slib has an internal API that all scheme impls must meet, and init files for each impl. I did not come across documentation of that API; perhaps we should suggest that to Audrey and also to make a note in the slib NEWS file :-) Further complicating things, slib has the notion of 'adding slib to one's scheme implementation' by modifying the default startup path to include in our case slib's guile.init. This is problematic from the viewpoint of a system where some users/programs want slib and some don't. Guile solves this the slib module where if you haven't (use-modules (ice-9 slib)) then you don't see any bindings. So, I think the only fully satisfactory solution from a both functional and software maintenance view is that slib needs to define the API that guile.init has to provide for users for slib. There are of course a lot of internal procedures, but we don't have to export those. I'm afraid that the file I sent fails to export some procedures, but it was enough to make gnucash work with slib. Looking over the docs and code, it seems that the texinfo manual defines a bunch of procedures/variables that the user can use. They seem to be present, so I looked at slib's guile.init, and it was the following cool/sick code: (define base:define define) (define define (procedure->memoizing-macro (lambda (exp env) (cons (if (= 1 (length env)) 'define-public 'base:define) (cdr exp))))) which I think results in all the defines in the file being define-public. For example, (scheme-implementation-home-page) works, so perhaps we don't have to explicitly export things, and we can just load guile.init after doing define-module. -- Greg Troxel <[EMAIL PROTECTED]> _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user