This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Module of loaded files
- From: Chris Dean <Chris dot Dean at sokitomi dot com>
- To: Kawa List <kawa at sources dot redhat dot com>
- Date: Wed, 16 Jul 2003 23:47:07 -0700
- Subject: Module of loaded files
If I use the "load" procedure to load a file, what module is that loaded
file in? If it's something like a "top-level" module is there a way I
can load definitions into that top-level module?
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.
Regards,
Chris Dean
==> M.scm <==
(module-static #t)
(module-name <M>)
(define (func)
'ok)
(define (process file)
(format #t "Loading ~S~%" file)
(load file))
==> F.scm <==
(func)
==> Driver.scm <==
(require <M>)
(process "F.scm")