[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: re-using a module
From: |
Viktor Pavlenko |
Subject: |
Re: re-using a module |
Date: |
Tue, 30 Mar 2004 12:27:36 -0500 |
> From: David Pirotte <address@hidden>
> Date: 2004/03/30 Tue AM 11:13:11 EST
>
> On Tue, 30 Mar 2004 10:50:45 -0500
> address@hidden (Paul Jarc) wrote:
>
> > Viktor Pavlenko <address@hidden> wrote:
> > > is there a way to reload a module in guile?
> >
> > Untested black magic:
> > (use-modules (aaa))
> > (local-remove '(app modules aaa))
> > (use-modules (aaa))
>
Thanks, that's great. OTOH why isn't it done by default? Shouldn't
guile do a cleanup if it fails to load a module? Besides I'm not too
inclined to use "black magic" in my code...
> once a module has been used, unless you define new
> symbols/functions/methods ... you can simply load the file
>
> (load "xxx.scm")
>
This (although painful) works great too. Incidentally, I looked for
a C equivalent, and found only scm_primitive_load. Scheme primitive-load
differs from load in that it disregards the module's export list
(makes all module's symbols visible :-(
Thanks for your help.
Viktor