This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: the right way to compile and load modules
- From: Per Bothner <per at bothner dot com>
- To: kawa at sourceware dot org
- Date: Tue, 13 May 2014 00:54:56 -0700
- Subject: Re: the right way to compile and load modules
- Authentication-results: sourceware.org; auth=none
- References: <9F312D97-98C6-4F47-BDD9-B6CAF3868A28 at me dot com>
On 05/12/2014 09:09 PM, mikel evins wrote:
Okay, so I add a module-export form to bar.scm and recompile.
Now foo.class runs as expected, but there's a new problem: if I load bar.scm, kawa complains that bar is exported but never defined.
A possible problem is that load is line-by-line, which is fundamentally
incompatible with modules as a unit - and thus with export. If you use
load, leave off the exports.
Better to always use require (or r7rs import). You can use require to
import a source file (though you can't yet use import for that).
I don't have an example - it late, I'm tired, and my initial experiment
is doing something weird. :-(
More tomorrow.
--
--Per Bothner
per@bothner.com http://per.bothner.com/