Make additional icyc modules visible in repl

By recreating a fresh global environment after all imports have been processed, and passing this to eval, all modules loaded by icyc are available to eval.
This commit is contained in:
Justin Ethier 2016-01-05 23:00:10 -05:00
parent 5c9651c5df
commit 1c87635236
2 changed files with 4 additions and 1 deletions

View file

@ -7,6 +7,7 @@
(import (scheme cyclone common)
(scheme base)
(scheme char)
(scheme load)
(scheme read)
(scheme write)
(scheme eval))
@ -15,6 +16,7 @@
(display *Cyc-version-banner*))
(else #f))
(define *icyc-env* (setup-environment))
(define (repl:next-line)
(call/cc
(lambda (k)
@ -38,7 +40,7 @@
(define (repl)
(display "cyclone> ")
(let ((c (eval (read))))
(let ((c (eval (read) *icyc-env*)))
(cond
((not (eof-object? c))
(write c)

View file

@ -17,6 +17,7 @@
;environment
eval
create-environment ; non-standard
setup-environment ; non-standard
)
(begin