From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Walck, Scott" Newsgroups: gmane.lisp.guile.user Subject: RE: set-current-module in .guile ? Date: Sat, 5 Apr 2008 20:01:11 -0400 Message-ID: References: <18423.46537.161648.253613@entangle.lvc.edu>, <47F7E878.20609@wilsonjc.us> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1207440048 16878 80.91.229.12 (6 Apr 2008 00:00:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Apr 2008 00:00:48 +0000 (UTC) To: "guile-user@gnu.org" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Apr 06 02:01:20 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 1JiIJz-0007Vq-JX for guile-user@m.gmane.org; Sun, 06 Apr 2008 02:01:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiIJM-0008IU-OU for guile-user@m.gmane.org; Sat, 05 Apr 2008 20:00:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JiIJI-0008IP-Gq for guile-user@gnu.org; Sat, 05 Apr 2008 20:00:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JiIJG-0008ID-Ub for guile-user@gnu.org; Sat, 05 Apr 2008 20:00:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiIJG-0008IA-Oa for guile-user@gnu.org; Sat, 05 Apr 2008 20:00:34 -0400 Original-Received: from lvc02.lvc.edu ([192.77.143.72] helo=exchange.lvc.edu) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1JiIJG-0004wR-GM for guile-user@gnu.org; Sat, 05 Apr 2008 20:00:34 -0400 Original-Received: from lvc02.lvc.edu ([10.1.1.71]) by lvc02.lvc.edu ([10.1.1.71]) with mapi; Sat, 5 Apr 2008 20:01:11 -0400 Thread-Topic: set-current-module in .guile ? Thread-Index: AciXX9k6bnhFWCSbTRyNnIo6ucavKAAGJHls In-Reply-To: <47F7E878.20609@wilsonjc.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ 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:6519 Archived-At: I don't know how to use use-modules in this situation. I'm not trying to l= oad 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 i= t 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=3Dlvc.edu@gnu.org [guile-user-bounces+walck= =3Dlvc.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 >