mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-11 23:17:34 +02:00
Guarding @import expressions from the repl.
This commit is contained in:
parent
4452607836
commit
b840602d6c
1 changed files with 31 additions and 26 deletions
|
@ -195,6 +195,11 @@
|
||||||
(mod+imps (eval `(resolve-import ',mod-name)
|
(mod+imps (eval `(resolve-import ',mod-name)
|
||||||
meta-env)))
|
meta-env)))
|
||||||
(if (pair? mod+imps)
|
(if (pair? mod+imps)
|
||||||
|
(guard
|
||||||
|
(exn
|
||||||
|
(else
|
||||||
|
(print-exception exn (current-error-port))
|
||||||
|
(fail "error loading module:" mod-name)))
|
||||||
(let ((env (if (eq? op 'import-only)
|
(let ((env (if (eq? op 'import-only)
|
||||||
(let ((env (make-environment)))
|
(let ((env (make-environment)))
|
||||||
(interaction-environment env)
|
(interaction-environment env)
|
||||||
|
@ -206,7 +211,7 @@
|
||||||
meta-env)
|
meta-env)
|
||||||
1)))
|
1)))
|
||||||
(%import env imp-env (cdr mod+imps) #f)
|
(%import env imp-env (cdr mod+imps) #f)
|
||||||
(continue module env meta-env))
|
(continue module env meta-env)))
|
||||||
(fail "couldn't find module:" mod-name))))
|
(fail "couldn't find module:" mod-name))))
|
||||||
((in)
|
((in)
|
||||||
(let ((name (read/ss in)))
|
(let ((name (read/ss in)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue