made environment-symbols work on the interaction-environment.

This commit is contained in:
Abdulaziz Ghuloum 2008-09-10 11:02:42 -07:00
parent 0b017898a8
commit 30cd6a2de8
2 changed files with 7 additions and 5 deletions

View File

@ -1 +1 @@
1593 1594

View File

@ -3084,7 +3084,6 @@
((_ exp-decl* ...) ((_ exp-decl* ...)
(chi-body* (cdr e*) r mr lex* rhs* mod** kwd* (chi-body* (cdr e*) r mr lex* rhs* mod** kwd*
(append exp-decl* exp*) rib top?)))) (append exp-decl* exp*) rib top?))))
((import) ((import)
(let () (let ()
(define (module-import? e) (define (module-import? e)
@ -3588,9 +3587,12 @@
(lambda (x) (or (env? x) (interaction-env? x)))) (lambda (x) (or (env? x) (interaction-env? x))))
(define (environment-symbols x) (define (environment-symbols x)
(if (env? x) (cond
(vector->list (env-names x)) [(env? x) (vector->list (env-names x))]
(assertion-violation 'environment-symbols "not an environment" 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 ;;; This is R6RS's environment. It parses the import specs
;;; and constructs an env record that can be used later by ;;; and constructs an env record that can be used later by