This is the mail archive of the kawa@sourceware.org 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]

the right way to compile and load modules


I have a main file, foo.scm. The code in that file uses a function bar, defined in bar.scm. 

The kawa docs claim that by default, all definitions in bar.scm are exported, but that does not appear to be the case. When I compile the two files with --main, I get a foo.class that throws a runtime error because bar is not defined.

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. 

In fact, though, bar is defined; checking in the kawa repl shows that it's defined, and, of course, the built foo.class runs as expected, including the call to bar.

I can only hope I'm doing something wrong.

What's the right way to make symbols from bar visible in foo, and also avoid generating spurious warnings about undefined symbols when loading bar.scm interactively?



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