* Better error message for applying unbound vars.
This commit is contained in:
parent
a20884c16b
commit
a13ad99195
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -39,7 +39,7 @@
|
||||||
(error 'top-level-value "~s is not a symbol" x))
|
(error 'top-level-value "~s is not a symbol" x))
|
||||||
(let ([v ($symbol-value x)])
|
(let ([v ($symbol-value x)])
|
||||||
(when ($unbound-object? v)
|
(when ($unbound-object? v)
|
||||||
(error 'top-level-value "unbound variable ~s" x))
|
(error 'eval "~a is unbound" x))
|
||||||
v)))
|
v)))
|
||||||
|
|
||||||
(define top-level-bound?
|
(define top-level-bound?
|
||||||
|
@ -87,8 +87,10 @@
|
||||||
(if (procedure? v)
|
(if (procedure? v)
|
||||||
v
|
v
|
||||||
(lambda args
|
(lambda args
|
||||||
(error 'apply "~s is not a procedure"
|
(let ([v ($symbol-value x)])
|
||||||
($symbol-value x))))))))
|
(if ($unbound-object? v)
|
||||||
|
(error 'eval "~a is unbound" x)
|
||||||
|
(error 'apply "~s is not a procedure" v)))))))))
|
||||||
|
|
||||||
(define string->symbol
|
(define string->symbol
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
|
Loading…
Reference in New Issue