From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jon Wilson Newsgroups: gmane.lisp.guile.user Subject: Re: set-current-module in .guile ? Date: Sat, 05 Apr 2008 17:00:40 -0400 Message-ID: <47F7E878.20609@wilsonjc.us> References: <18423.46537.161648.253613@entangle.lvc.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1207429080 22242 80.91.229.12 (5 Apr 2008 20:58:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2008 20:58:00 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Apr 05 22:58:32 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JiFT4-0007rF-Oq for guile-user@m.gmane.org; Sat, 05 Apr 2008 22:58:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiFSS-0006HN-0N for guile-user@m.gmane.org; Sat, 05 Apr 2008 16:57:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JiFSN-0006HA-FN for guile-user@gnu.org; Sat, 05 Apr 2008 16:57:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JiFSL-0006Gy-0l for guile-user@gnu.org; Sat, 05 Apr 2008 16:57:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiFSK-0006Gv-SL for guile-user@gnu.org; Sat, 05 Apr 2008 16:57:44 -0400 Original-Received: from mailgw2.fnal.gov ([131.225.111.12]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JiFSK-0000Ip-PR for guile-user@gnu.org; Sat, 05 Apr 2008 16:57:44 -0400 Original-Received: from mailav2.fnal.gov (mailav2.fnal.gov [131.225.111.20]) by mailgw2.fnal.gov (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) with SMTP id <0JYV00M93E1HC4@mailgw2.fnal.gov> for guile-user@gnu.org; Sat, 05 Apr 2008 15:56:30 -0500 (CDT) Original-Received: from mailgw2.fnal.gov ([131.225.111.12]) by mailav2.fnal.gov (SAVSMTP 3.1.7.47) with SMTP id M2008040515562915370 for ; Sat, 05 Apr 2008 15:56:29 -0500 Original-Received: from conversion-daemon.mailgw2.fnal.gov by mailgw2.fnal.gov (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) id <0JYV00I01DZ87O@mailgw2.fnal.gov> (original mail from jsw@wilsonjc.us) for guile-user@gnu.org; Sat, 05 Apr 2008 15:56:30 -0500 (CDT) Original-Received: from wilsonjc.us (cpe-75-187-46-126.columbus.res.rr.com [75.187.46.126]) by mailgw2.fnal.gov (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) with ESMTPA id <0JYV00MN1E648Z@mailgw2.fnal.gov> for guile-user@gnu.org; Sat, 05 Apr 2008 15:56:29 -0500 (CDT) In-reply-to: <18423.46537.161648.253613@entangle.lvc.edu> User-Agent: Thunderbird 2.0.0.12 (X11/20080227) X-detected-kernel: by monty-python.gnu.org: Solaris 9 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6518 Archived-At: 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 >