Skip to content

Commit

Permalink
More consistent behavior under type lookup failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Apr 26, 2012
1 parent 6a7b398 commit 2c36101
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/types.lisp
Expand Up @@ -180,8 +180,11 @@
(defun type-resolve (code &optional (env *primitives-env*))
(etypecase code
(integer code)
((or bl-symbol string) (or (lookup code :type env)
(error "~A names no type binding!" code)))
((or bl-symbol string) (multiple-value-bind (type exists)
(lookup code :type env)
(if exists
type
(error "Type ~A is not in scope!" code))))
(list (let ((ctor (type-resolve (first code) env)))
(typecase ctor
(special-tycon (apply (special-tycon-resolver ctor)
Expand Down

0 comments on commit 2c36101

Please sign in to comment.