[Top][All Lists]

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

RE: set-current-module in .guile ?

From: Walck, Scott
Subject: RE: set-current-module in .guile ?
Date: Sat, 5 Apr 2008 20:01:11 -0400

I don't know how to use use-modules in this situation.  I'm not trying to load 
a module that has been prepared as a file.  I tried

(load "/usr/local/src/guile-scmutils/src/load.scm")
(use-modules generic-environment)


(load "/usr/local/src/guile-scmutils/src/load.scm")
(use-modules 'generic-environment)


(load "/usr/local/src/guile-scmutils/src/load.scm")
(use-modules (generic-environment))

in my .guile file, but none of them work.

Is there a way to take a module object like generic-environment and write it to 
a file that could be loaded with use-modules?

Scott N. Walck
Associate Professor of Physics
Lebanon Valley College

From: address@hidden address@hidden On Behalf Of Jon Wilson address@hidden
Sent: Saturday, April 05, 2008 5:00 PM
To: address@hidden
Subject: Re: set-current-module in .guile ?

Hi Scott,
Can you for some reason not use use-modules?

Scott N. Walck wrote:
> Dear Guilers,
> Dan Gildea has ported a large fraction of Gerry Sussman's scmutils
> code from MIT-scheme to guile.  In doing so, he uses guile modules
> instead of MIT-scheme environments.  Much of the code creates a module
> called "generic-environment".  In an interactive guile session, you
> type
> (set-current-module generic-environment)
> and this redefines "+", for example, to add functions and vectors.
> I would like to know if there is a way to set the interactive
> environment to "generic-environment" in a .guile file.  If I put
> (set-current-module generic-environment)
> in a .guile file, it does nothing.  (I suppose because the current
> module when reading the .guile file is different from the current
> module in an interactive guile session?)
> I would like to use this guile-scmutils with physics students, and I
> would like to hide from them the need to execute
> (set-current-module generic-environment)
> in an interactive session.  Of course, I could pre-load
> (define start
>   (lambda ()
>     (set-current-module generic-environment)))
> in a .guile file or with the -l option, and then students would only
> need to type
> (start)
> but it's still awkward, and it's a detail that I don't want to have to
> explain to them.
> I would appreciate any suggestions that folks might have.
> Scott

reply via email to

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