This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Struggling with compiling a module as classes and using (load) on it
On 01/09/2012 11:04 AM, Bill Robinson wrote:
On 9 January 2012 18:37, Bill Robinson<airbaggins@gmail.com> wrote:
(load "testpackage.testmodule")
Ah I've just found that using (require<testpackage.testmodule>)
instead of the (load ...) works! :)
require is definitely recommended.
However, it seems plausible to extend load so it can take a classname,
if nothing else for compatibility with the -f command-line option.
So I checked in support for that.
Note you still get the:
warning - no declaration seen for testfunction
if you do: kawa testrunner.scm
However, if you do:
kawa -f testrunner.scm
then you don't get the warning.
The reason is that 'kawa -f testrunner.scm' reads and evaluates
testrunner.scm (as does the 'load' function), while 'kawa testrunner.scm'
reads and compiles the whole file as a module before evaluating it.
This causes some differences in certain cases.
--
--Per Bothner
per@bothner.com http://per.bothner.com/