From: "Issac Trotts" <ijtrotts@ucdavis.edu>
Subject: Re: specifying module with eval
Date: Mon, 26 Jan 2004 17:25:23 -0800 [thread overview]
Message-ID: <20040127012523.GA3664@manzanita> (raw)
In-Reply-To: <200401270028.i0R0SkAp025906@pc18.math.umbc.edu>
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)
<unnamed port>:1:16: In expression (scheme-report-environment 5):
<unnamed port>: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)
<unnamed port>:2:16: In expression (null-environment 5):
<unnamed port>: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
next prev parent reply other threads:[~2004-01-27 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 0:28 specifying module with eval Rouben Rostamian
2004-01-27 1:25 ` Issac Trotts [this message]
2004-02-10 1:06 ` Rob Browning
2004-02-18 22:30 ` Marius Vollmer
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=20040127012523.GA3664@manzanita \
--to=ijtrotts@ucdavis.edu \
/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).