scsh-users
[Top] [All Lists]

Re: Modules

To: pax! <pax@dedalo.ws>
Subject: Re: Modules
From: RT Happe <rthappe@mathematik.uni-freiburg.de>
Date: Sun, 8 Dec 2002 19:25:02 +0100 (CET)
Cc: <scsh-news@zurich.ai.mit.edu>
On Sun, 8 Dec 2002, pax! wrote:
> >>>>> "sperber" == Michael Sperber <sperber@informatik.uni-tuebingen.de> 
> >>>>> writes:
> sperber> ,config ,load <module-code.scm>
> sperber> in the REPL or via the -lm command-line switch.  Details
> sperber> are in Chapter 11 of the scsh manual.
>
> But for this case none of these are a good solution, because neither I
> want to execute this interactively, nor are these test modules
> executables by themselves. I need to programmatically load the configure
> package definitions to define new structures in modules that aren't
> executable scripts by themselves, but libraries of functions.

In a typical situation, you specify module dependencies statically in a
configuration file, load that in the config package as Mike Sperber
indicated, and let the scsh system do the loading of required files
whenever you open a structure, e.g. a structure test-suite that exports
the binding run-tests and depends on other structures test-foo, test-bar,
scsh, whatever.  I don't see why this shouldn't fit your needs.  Anyway,
you may want to read up on Scheme 48 modules (much different from the
old-style provide/require mechanism) and have a look on Olin Shivers
explanation listed in the docu section at scsh.net:
http://www.scsh.net/post/modules.html

rthappe



<Prev in Thread] Current Thread [Next in Thread>