Make exception handlers smarter about opening the result.

This commit is contained in:
Eric Dobson 2014-04-01 23:49:47 -07:00
parent 34c3eed615
commit d29df205f7

View File

@ -58,13 +58,13 @@
(define body-ty #f) (define body-ty #f)
(define body-stx #f) (define body-stx #f)
;; tc-result1 -> tc-results ;; tc-result1 -> tc-results
;; The result of applying the function to a single argument of type (Un) ;; The result of applying the function to a single argument of the type of its first argument
;; FIXME: (Un) is the wrong type, see above fixme ;; FIXME: This is the wrong type, see above fixme
(define (get-result-ty t) (define (get-result-ty t)
(let loop ((t t)) (let loop ((t t))
(match t (match t
[(Function: _) [(Function: (cons (arr: (cons arg1 args) _ _ _ _) _))
(tc/funapp #'here #'(here) (ret t) (list (ret (Un))) #f)] (tc/funapp #'here #'(here) (ret t) (list (ret arg1)) #f)]
[(? needs-resolving? t) [(? needs-resolving? t)
(loop (resolve t))] (loop (resolve t))]
[(or (Poly: ns _) (PolyDots: (list ns ... _) _)) [(or (Poly: ns _) (PolyDots: (list ns ... _) _))