summaryrefslogtreecommitdiff
path: root/module/ice-9/eval.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/ice-9/eval.scm')
-rw-r--r--module/ice-9/eval.scm14
1 files changed, 10 insertions, 4 deletions
diff --git a/module/ice-9/eval.scm b/module/ice-9/eval.scm
index 5c66903e7..516c8a17e 100644
--- a/module/ice-9/eval.scm
+++ b/module/ice-9/eval.scm
@@ -37,7 +37,8 @@
(if (null? env)
(current-module)
(if (not env)
- the-root-module
+ ;; the and current-module checks that modules are booted
+ (and (current-module) the-root-module)
env)))))
;; could be more straightforward if we had better copy propagation
@@ -115,10 +116,14 @@
(if rest?
(cons args env)
(if (not (null? args))
- (error "too many args" args)
+ (scm-error 'wrong-number-of-args
+ "eval" "Wrong number of arguments"
+ '() #f)
env)))
(if (null? args)
- (error "too few args" nreq)
+ (scm-error 'wrong-number-of-args
+ "eval" "Wrong number of arguments"
+ '() #f)
(lp (cons (car args) env)
(1- nreq)
(cdr args))))))))
@@ -194,7 +199,8 @@
(lambda (exp)
(eval
- (memoize-expression ((or (module-transformer (current-module)) identity)
+ (memoize-expression ((or (module-transformer (current-module))
+ (lambda (x) x))
exp))
'()))))