This is the mail archive of the kawa@sources.redhat.com 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]

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")


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