[Larceny-users] procedure introspection
Felix Klock
felixluser at pnkfx.org
Fri Mar 13 20:27:43 EDT 2009
jao-
On Mar 13, 2009, at 5:35 PM, Jose A. Ortega Ruiz wrote:
> Sorry, i forgot a question in my previous response: is there a way to
> get the list of bound identifiers in a given environment/library? (i'd
> use that to provide symbol completion in Scheme buffers).
You can query for the environments provided by an environment object,
such as the interaction environment. (This is not the same thing as
the lexical environment of a particular expression.)
The relevant procedure is environment-variables -- this functionality
is the basis of the apropos library, which I've included a
demonstration of below.
-Felix
Larceny v0.97a3 (alpha test) (Mar 4 2009 11:51:41, precise:Posix
Unix:unified)
/home/pnkfelix/.larceny: adding lib/Experimental to require path
larceny.heap, built on Wed Mar 4 12:44:23 EST 2009
> (require 'apropos)
#t
> (apropos 'macro)
(environment-get-macro
environment-macro?
environment-macros
environment-set-macro!
macro-expand
macro-expand-expression
macro-expander)
More information about the Larceny-users
mailing list