guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: re-using a module


From: Issac Trotts
Subject: Re: re-using a module
Date: Tue, 30 Mar 2004 03:37:32 -0800
User-agent: Mutt/1.3.28i

On Tue, Mar 30, 2004 at 12:27:36PM -0500, Viktor Pavlenko wrote:
> > 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 :-(

Why not use gh_eval_str("(load \"xxx.scm\"")") ?

ijt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]