>>>>> "sperber" == Michael Sperber <sperber@informatik.uni-tuebingen.de> writes:
>>>>> "FVF" == Francisco Vides Fernandez <pax@dedalo.ws> writes:
FVF> It seems the Right Thing To Do. I can define all test suites as
FVF> modules. But in order to load them at runtime, still would have
FVF> to do something like:
FVF> (load file (structure-package (eval '(config '(run defpackage))
FVF> (user-command-environment))))
FVF> Which seems a bit too much complicated for such a common
FVF> operation.
sperber> I'm still confused. What exactly do you mean by "at
sperber> runtime"? In the REPL, you can ,config ,load these things.
sperber> (It doesn't hurt to load them all---they're only compiled
sperber> when they're opened.) From the command line, you can do
sperber> -lm.
Yes. I have to change my mind a little. I mean "from a program", not
in the REPL. I can't use -lm, since I don't know a priori which files
are to be loaded.
sperber> If you must do this from a program, open
sperber> PACKAGE-COMMANDS-INTERNAL. There, (config-package) returns
sperber> the package the module system lives in. So you can do
sperber> (load file (config-package))
This is exactly what I wanted. But I haven't found any refence to this
outside the source code, I've tryied and it works fine.
sperber> to load modules from a program.
So now, I can do something like:
(define-structure test-driver
(export main)
(open package-commands-internal scheme)
(begin
...
(define (main args)
...
(for-each (lambda (file)
(load file (config-package))
;; here I should open the structure
)))
...
...
))
And loads all structures into config package. Right. But these
structures aren't opened after I load them. I guess I should open with
a scheme form. I've searched the equivalent for the ,open command in a
scheme form, but I can't find it. Can you give me some clue?
Thanks for your patience :)
--
+-----------------
| Francisco Vides Fernández <pvides@dedalo.ws>
| Director técnico.
| Teléfono fijo: 952 60 29 59
| Teléfono móvil: 661 67 32 73
| Fax: 952 60 29 59
| Dédalo Ingenieros http://www.dedalo.ws/
| PGP: http://pgp.rediris.es:11371/pks/lookup?op=index&search=0x605ecbab
+------
|