[Openmcl-devel] accessing lexical variables (lexical-environment vsdefinition-environment)
David L. Rager
ragerdl at cs.utexas.edu
Tue Jul 19 16:41:44 UTC 2005
Is this your final objective, or are you trying to save the values
relevant to a function call for processing a closure later?
From: openmcl-devel-bounces at clozure.com
[mailto:openmcl-devel-bounces at clozure.com] On Behalf Of Marco Baringer
Sent: Tuesday, July 19, 2005 9:34 AM
To: openmcl-devel at clozure.com
Subject: [Openmcl-devel] accessing lexical variables
i need a function which, at macro expansion time, collects the names
(as symbols) of all the visibile lexical variables. is there anything
which looks blatently wrong with this?
(defun lexical-variables (environment)
for env = environment
then (ccl::lexenv.parent-env env)
while (and env
(not (ccl::istruct-typep env
for vars = (ccl::lexenv.variables env)
when (listp vars)
append (mapcar (lambda (var)
;; ccl::var-name is a macro, se we can't do
in particular i want to make sure that i can stop looking for
variables as soon as i hit a definition-environment object.
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
Openmcl-devel mailing list
Openmcl-devel at clozure.com
More information about the Openmcl-devel