1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

Fix REPL environment for languages other than scheme.

* module/system/repl/common.scm (repl-compile): Use `#:env #f' for
  languages other than scheme.
This commit is contained in:
Ludovic Courtès 2009-10-15 20:51:16 +02:00
parent 3245c0fbef
commit 30e73c7698

View file

@ -67,9 +67,15 @@
(let ((to (lookup-language (cond ((memq #:e opts) 'scheme)
((memq #:t opts) 'ghil)
((memq #:c opts) 'glil)
(else 'objcode)))))
(compile form #:from (repl-language repl) #:to to #:opts opts
#:env (current-module))))
(else 'objcode))))
(from (repl-language repl)))
(compile form #:from from #:to to #:opts opts
;; XXX: Languages other than Scheme may not support having
;; a module as the environment, so work around that. See
;; also `language-default-environment'.
#:env (if (eq? from (lookup-language 'scheme))
(current-module)
#f))))
(define (repl-parse repl form)
(let ((parser (language-parser (repl-language repl))))