This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Module of loaded files
- From: Per Bothner <per at bothner dot com>
- To: Chris Dean <Chris dot Dean at sokitomi dot com>
- Cc: Kawa List <kawa at sources dot redhat dot com>
- Date: Thu, 17 Jul 2003 00:00:32 -0700
- Subject: Re: Module of loaded files
- References: <27252.1058424427@mercedsystems.com>
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/