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:
parent
3245c0fbef
commit
30e73c7698
1 changed files with 9 additions and 3 deletions
|
@ -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))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue