This is the mail archive of the
mailing list for the Guile project.
Re: gh_lookup no longer works??
- To: email@example.com (Steven G. Johnson)
- Subject: Re: gh_lookup no longer works??
- From: Mikael Djurfeldt <firstname.lastname@example.org>
- Date: 29 Aug 1999 21:35:36 +0200
- Cc: email@example.com, firstname.lastname@example.org
- Cc: email@example.com
- References: <9908270029.AA08295@hunsmac.mit.edu>
firstname.lastname@example.org (Steven G. Johnson) writes:
> Russell McManus <email@example.com> wrote:
> >Take a look at the guile FAQ, and read the
> I don't think the module system (which this FAQ entry describes) is
> the problem, since I'm not using modules.
Well, still, this is the problem, unfortunately.
The problem is that gh_lookup looks up variables in the root module
(guile), while gh_eval_str evaluates strings in the module selected as
"current" by the repl.
When your application starts, the "current" module is (guile-user).
So, if you, in your test program, do:
(define foo 1)
the two behaviours will coincide, and gh_lookup will find the symbol.
The real bug is in the gh interface itself since it doesn't define
which behaviour is intended. Since both behaviours are potentially
useful, and since I can imagine that many users depend on either, I'm
not going to fix this now.
We'll provide a better interface when we have the new module system.