[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dev-serveez] Re: problem with module system in guile 1.6.x and pos
Re: [dev-serveez] Re: problem with module system in guile 1.6.x and post versions
Sun, 1 Jun 2003 17:52:14 +0200 (CEST)
On 1 Jun 2003, Marius Vollmer wrote:
> > Hm. This somehow implies that
> > (define-module (test-suite)
> > :use-module (guile-user))
> > would be sufficient to solve the problem. But in fact in does not. Why
> > is this?
> Did you export your bindings? That is, did you call 'scm_c_export' in
> C or did you use 'export' in Scheme?
Oh well. That did it.
> > Even more confusing is that
> > (display (current-module))
> > tells me '#<directory (test-suite) 80cb260>' outside functions (e.g. right
> > behind the (define-module ...) thingie). But in a function exported by
> > the (test-suite) it tells me '#<directory (guile-user) 80cc500>'.
> Think of the current module simply as a global (per-thread) variable.
> The current module is not associated with a place in the code. It is
> associated with a certain extent of time, like the values of all
> global variables.
> When a function is defined (more precisely, when a closure is
> created), the current module (at the time of the definition) is
> recorded in the lexical environment of the function. All non-local
> variable references within that function are resolved with that
> recorded module.
Thanks for this explanation.
Thus (module-for-each ... ) returns all variables, local and public ones,
With your help I was able to solve the serveez problems.
- Re: [dev-serveez] Re: problem with module system in guile 1.6.x and post versions,