Modified repl's load to pull defs into *icyc-env*

This commit is contained in:
Justin Ethier 2016-06-23 21:51:06 -04:00
parent a21ecebea7
commit 0db31ea6d9

View file

@ -8,6 +8,7 @@
;;;;
(import (scheme cyclone common)
(scheme cyclone libraries)
(scheme cyclone util)
(scheme base)
(scheme char)
(scheme lazy)
@ -58,6 +59,11 @@
(display "\n")
(exit 0)))))
;; Use a special version of load to pull defs into the repl's env
(define (load2 f)
(load f *icyc-env*))
(env:define-variable! 'load load2 *icyc-env*)
(let ((args (command-line-arguments)))
(if (= (length args) 1)
(load (car args) *icyc-env*))