public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* the right way to compile and load modules
@ 2014-05-13  4:09 mikel evins
  2014-05-13  7:29 ` Charles Turner
  2014-05-13  7:55 ` Per Bothner
  0 siblings, 2 replies; 30+ messages in thread
From: mikel evins @ 2014-05-13  4:09 UTC (permalink / raw)
  To: kawa; +Cc: mikel evins

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?


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2014-05-15  2:16 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13  4:09 the right way to compile and load modules mikel evins
2014-05-13  7:29 ` Charles Turner
2014-05-13  7:45   ` mikel evins
2014-05-13  7:49   ` Per Bothner
2014-05-13  7:55 ` Per Bothner
2014-05-13  8:02   ` mikel evins
2014-05-13  8:40     ` mikel evins
2014-05-13 10:23       ` mikel evins
2014-05-14  1:13       ` mikel evins
2014-05-14  1:19         ` parameters not working? mikel evins
2014-05-14  1:31           ` Per Bothner
2014-05-14  1:41             ` mikel evins
2014-05-14  2:12             ` mikel evins
2014-05-14  2:19               ` mikel evins
2014-05-14  9:32             ` mikel evins
2014-05-14 16:07               ` Per Bothner
2014-05-14  1:43         ` the right way to compile and load modules Per Bothner
2014-05-14  1:50           ` mikel evins
2014-05-14  2:05           ` mikel evins
2014-05-14  3:52             ` Per Bothner
2014-05-14  3:59               ` mikel evins
2014-05-14  6:29                 ` Per Bothner
2014-05-14  6:52                   ` mikel evins
2014-05-14 18:59                     ` Kawa experience [was: the right way to compile and load modules] Per Bothner
2014-05-14 20:06                       ` Charles Turner
2014-05-15  2:16                       ` mikel evins
2014-05-14  7:26                   ` the right way to compile and load modules mikel evins
2014-05-14  7:33               ` Per Bothner
2014-05-14  7:35                 ` mikel evins
2014-05-14 18:46                 ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).