Added &undefined condition to unbound error conditions.

This commit is contained in:
Abdulaziz Ghuloum 2008-07-29 07:54:06 -07:00
parent d84dd99061
commit c0a1abace1
2 changed files with 10 additions and 10 deletions

View File

@ -54,9 +54,13 @@
(die 'top-level-value "not a symbol" x)) (die 'top-level-value "not a symbol" x))
(let ([v ($symbol-value x)]) (let ([v ($symbol-value x)])
(when ($unbound-object? v) (when ($unbound-object? v)
(die 'eval "unbound variable" (raise
(string->symbol (condition
(symbol->string x)))) (make-undefined-violation)
(make-who-condition 'eval)
(make-message-condition "unbound variable")
(make-irritants-condition
(list (string->symbol (symbol->string x)))))))
v))) v)))
(define top-level-bound? (define top-level-bound?
@ -104,12 +108,8 @@
(if (procedure? v) (if (procedure? v)
v v
(lambda args (lambda args
(let ([v ($symbol-value x)]) (die 'apply "not a procedure"
(if ($unbound-object? v) (top-level-value x))))))))
(die 'eval "unbound variable"
(string->symbol
(symbol->string x)))
(die 'apply "not a procedure" v)))))))))
(define string->symbol (define string->symbol
(lambda (x) (lambda (x)

View File

@ -1 +1 @@
1558 1559