This is the mail archive of the
mailing list for the Guile project.
Re: gh_lookup no longer works??
- To: firstname.lastname@example.org (Steven G. Johnson)
- Subject: Re: gh_lookup no longer works??
- From: Mikael Djurfeldt <email@example.com>
- Date: 29 Aug 1999 21:35:36 +0200
- Cc: firstname.lastname@example.org, email@example.com
- Cc: firstname.lastname@example.org
- References: <9908270029.AA08295@hunsmac.mit.edu>
email@example.com (Steven G. Johnson) writes:
> Russell McManus <firstname.lastname@example.org> 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.