From 30cd6a2de896e2c4b9c1f813d51a0eef97c24bb7 Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Wed, 10 Sep 2008 11:02:42 -0700 Subject: [PATCH] made environment-symbols work on the interaction-environment. --- scheme/last-revision | 2 +- scheme/psyntax.expander.ss | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scheme/last-revision b/scheme/last-revision index 7b222bc..6afcd4b 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1593 +1594 diff --git a/scheme/psyntax.expander.ss b/scheme/psyntax.expander.ss index 2143dd9..90f6cfd 100644 --- a/scheme/psyntax.expander.ss +++ b/scheme/psyntax.expander.ss @@ -3084,7 +3084,6 @@ ((_ exp-decl* ...) (chi-body* (cdr e*) r mr lex* rhs* mod** kwd* (append exp-decl* exp*) rib top?)))) - ((import) (let () (define (module-import? e) @@ -3588,9 +3587,12 @@ (lambda (x) (or (env? x) (interaction-env? x)))) (define (environment-symbols x) - (if (env? x) - (vector->list (env-names x)) - (assertion-violation 'environment-symbols "not an environment" x))) + (cond + [(env? x) (vector->list (env-names x))] + [(interaction-env? x) + (map values (rib-sym* (interaction-env-rib x)))] + [else + (assertion-violation 'environment-symbols "not an environment" x)])) ;;; This is R6RS's environment. It parses the import specs ;;; and constructs an env record that can be used later by