Kevin Ryde <[EMAIL PROTECTED]> writes: > Greg Troxel <[EMAIL PROTECTED]> writes: > > > > You are right, but if you object to going from what we have to what I > > posted, I don't see your point. > > I was hoping the issue could be killed for good, ie. impervious to > anything guile.init might do in the future :-).
My latest attempt comes as close as I think we can. > > slib needs to define the API that guile.init has to provide for > > users for slib. > > I suspect it's not that formal, but rather the init files are only > those bits which have turned out to vary between supported schemes. > The last change for instance moved bits out of the common files into > the init files. I think you are right. But it's currently hard to tell which definitions have to be exported from the module. But.... > > (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. > > Yes, for top-level defines. Dunno what that's actually meant to do > though. I think the idea is to cooperate with guile's module system and export all the top-level procedures. > Incidentally the test seems to fail in the guile cvs, different > implementation of env or something. I suppose we either need to fix guile cvs or get some new code for slib to do what it needs. Here's results from top-level interactive in a 1.6.8 release candidate. guile> (use-modules (ice-9 format)) guile> (define (a exp env) (format "exp ~A\nenv ~A\n" exp env)) guile> a #<procedure a (exp env)> guile> (define b (procedure->macro a)) guile> b #<macro a> guile> (b 'foo 'bar) "exp (b (quote foo) (quote bar)) env (#<eval-closure 80c0b50>) " -- Greg Troxel <[EMAIL PROTECTED]> _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user