This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Module of loaded files


Chris Dean wrote:

If I use the "load" procedure to load a file, what module is that loaded
file in?

None.


If it's something like a "top-level" module is there a way I
can load definitions into that top-level module?

A module provides lexical (compile-time) namebinding.
load is a function, so it cannot load "into" a module, but it effects the current dynamic environment.
On the other hand, the you can load a module, which might require other modules.


Maybe an example will make this clear.  If I have some module "M" that
defines some function "func", how do I access func from some loaded file
F.scm?  When I run Driver program below I get an "Unbound symbol func"
error.

You need a (require <M>) in F.scm. -- --Per Bothner per@bothner.com http://per.bothner.com/



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