From: "Walck, Scott" <walck@lvc.edu>
To: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: RE: set-current-module in .guile ?
Date: Sat, 5 Apr 2008 20:01:11 -0400 [thread overview]
Message-ID: <E6C639C7E135D846B5127945421A789F06ECD97564@lvc02.lvc.edu> (raw)
In-Reply-To: <47F7E878.20609@wilsonjc.us>
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)
and
(load "/usr/local/src/guile-scmutils/src/load.scm")
(use-modules 'generic-environment)
and
(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: guile-user-bounces+walck=lvc.edu@gnu.org [guile-user-bounces+walck=lvc.edu@gnu.org] On Behalf Of Jon Wilson [jsw@wilsonjc.us]
Sent: Saturday, April 05, 2008 5:00 PM
To: guile-user@gnu.org
Subject: Re: set-current-module in .guile ?
Hi Scott,
Can you for some reason not use use-modules?
Regards,
Jon
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
>
next prev parent reply other threads:[~2008-04-06 0:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-05 17:24 set-current-module in .guile ? Scott N. Walck
2008-04-05 21:00 ` Jon Wilson
2008-04-06 0:01 ` Walck, Scott [this message]
2008-04-06 14:58 ` Ludovic Courtès
2008-04-07 1:27 ` Walck, Scott
2008-04-07 7:16 ` Ludovic Courtès
2008-04-07 11:27 ` Walck, Scott
2008-04-07 13:38 ` Ludovic Courtès
2008-04-07 15:07 ` Scott N. Walck
2008-04-08 13:40 ` Ludovic Courtès
2008-04-08 15:41 ` Scott N. Walck
2008-04-09 15:05 ` Ludovic Courtès
2008-04-09 15:24 ` Walck, Scott
2008-04-09 20:16 ` Neil Jerram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E6C639C7E135D846B5127945421A789F06ECD97564@lvc02.lvc.edu \
--to=walck@lvc.edu \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).