On Sat 14 Jan 2012 09:59, David Kastrup <d...@gnu.org> writes:

> In Guilev1, the module is probably recorded as part of the
> procedure-environment.  In Guilev2, a variable reference is compiled?
> How does that work when there is no such variable?  It gets created
> with an undefined binding?

Guile 2.0.x records the module that was current when the procedure was
created, if it is necessary to resolve toplevel bindings.

> within local-eval, what is the return value of calling
> (current-module)?  I would expect that it is the same as outside of
> local-eval

Yes.

> so that (define x 5) inside of local-eval would _not_ be equivalent to
> (module-define! (current-module) 'x 5) as the first one would take the
> current module at the-environment time, and the second one would take
> it at local-eval time.

This would be a lexical definition, and probably not allowed by the
current code.

Regards,

Andy
-- 
http://wingolog.org/

Reply via email to