Use the correct fail handler in type lookup

The other handler is meant for type name environments.
In practice, this should never come up in the current
codebase, but extensions that use `lookup-type` could
rely on it.
This commit is contained in:
Asumu Takikawa 2013-10-31 23:12:52 -04:00
parent acc4e92a71
commit 612a7fcca9

View File

@ -58,7 +58,7 @@
;; given an identifier, return the type associated with it
;; if none found, calls lookup-fail
;; identifier -> type
(define (lookup-type id [fail-handler (λ () (lookup-type-fail id))])
(define (lookup-type id [fail-handler (λ () (lookup-fail id))])
(define v (free-id-table-ref the-mapping id fail-handler))
(cond [(box? v) (unbox v)]
[(procedure? v) (define t (v)) (register-type id t) t]