This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Understanding eval2 and local-eval


"Dale P. Smith" <dpsm@en.com> writes:

> How do you use eval2?

Each module in the current system has something called a lookup
closure.  It can be retrieved using the selector

  module-eval-closure MODULE

While `local-eval' takes a lexical environment as second arg, eval2
takes a lookup closure as second arg.  So, eval2 evals on a ceratin
module's "top-level".

> Is there a way to remove definitions from an environment?  The macro
> undefine only works at the top-level.

No.  But if you know the structure of the current lexical
environments, you can do it.  I wouldn't advise using either `eval2'
or `local-eval', though.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]