This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


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

Displaying contents of Environments; how are exported names bound?


What's the best way, from inside a Kawa function, to display all the
bindings in the current environment and its predecessors, right back to
the global ones?

Reason for asking this is something alluded to before. If, from inside a
compiled module M, I create a lambda-expression and eval it to make a
function F, bindings for functions defined in M don't seem to be getting
added to the environment in which F is compiled. So references from F to
names exported from M cause 'undefined variable' errors when F is
executed. The situation is actually more complicated, and I haven't yet
found out exactly where the failure is, which is why I ask about
displaying the contents of an environment.

A related question then: In a posting of 4 April 2001, Per says:
  Note that Kawa has two different concepts: modules and environment.
  They are related, an Environment is (run-time) data structure that you
  can add bindings to.  A module has a static set of exported names, and
  can be instantiated, *resulting* in (something like) an Environment.
  That set of exported names can be added to some other Environment.

Given an environment E that I have just created, and a compiled module M,
how can I add M's exported names to E?

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091 




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