From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Issac Trotts" Newsgroups: gmane.lisp.guile.user Subject: Re: specifying module with eval Date: Mon, 26 Jan 2004 17:25:23 -0800 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <20040127012523.GA3664@manzanita> References: <200401270028.i0R0SkAp025906@pc18.math.umbc.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075167022 1552 80.91.224.253 (27 Jan 2004 01:30:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2004 01:30:22 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jan 27 02:30:16 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlI3U-0004SN-00 for ; Tue, 27 Jan 2004 02:30:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlI0Y-0000fY-Os for guile-user@m.gmane.org; Mon, 26 Jan 2004 20:27:14 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AlI01-0000er-ET for guile-user@gnu.org; Mon, 26 Jan 2004 20:26:41 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AlHzU-0000aW-3p for Guile-user@gnu.org; Mon, 26 Jan 2004 20:26:39 -0500 Original-Received: from [169.237.105.29] (helo=pop19.ucdavis.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlHzT-0000aN-EF for Guile-user@gnu.org; Mon, 26 Jan 2004 20:26:07 -0500 Original-Received: from scarlet.ucdavis.edu ([128.120.141.214]) by pop19.ucdavis.edu (8.12.10/8.12.9/it-std-5.2.0) with SMTP id i0R1Q54t005342 for ; Mon, 26 Jan 2004 17:26:05 -0800 (PST) Original-Received: by scarlet.ucdavis.edu (sSMTP sendmail emulation); Mon, 26 Jan 2004 17:25:23 -0800 Original-To: Guile-user@gnu.org Content-Disposition: inline In-Reply-To: <200401270028.i0R0SkAp025906@pc18.math.umbc.edu> User-Agent: Mutt/1.5.4i X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2725 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2725 On Mon, Jan 26, 2004 at 07:28:46PM -0500, Rouben Rostamian wrote: > The Guile 1.6.4 documentation says: > > - Scheme Procedure: eval exp module > - C Function: scm_eval (exp, module) > Evaluate EXP, a list representing a Scheme expression, in the > top-level environment specified by MODULE. While EXP is evaluated > (using `primitive-eval'), MODULE is made the current module. The > current module is reset to its previous value when EVAL returns. > > It is not clear to me how to specify a module name. > What is the syntax for it? > > In other words, what do I put for "module-spec" in the expression > > (eval '(foo 12) module-spec) > > to refer to the desired module? I was going to say "Have a look at p. 35 of the Scheme specification," but their advice doesn't work with the version of guile on my system (1.6.4): guile> (eval '(* 7 3) (scheme-report-environment 5)) Backtrace: In current input: 1: 0* [eval (* 7 3) ... 1: 1* (scheme-report-environment 5) :1:16: In expression (scheme-report-environment 5): :1:16: Unbound variable: scheme-report-environment ABORT: (unbound-variable) guile> (eval '(* 7 3) (null-environment 5)) Backtrace: In current input: 2: 0* [eval (* 7 3) ... 2: 1* (null-environment 5) :2:16: In expression (null-environment 5): :2:16: Unbound variable: null-environment ABORT: (unbound-variable) I wonder why guile doesn't conform to the spec here. -- Issac Trotts http://redwood.ucdavis.edu/~issac _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user