diff --git a/collects/typed-scheme/infer/infer-unit.ss b/collects/typed-scheme/infer/infer-unit.ss index 7981b69d4d..71149d8f0b 100644 --- a/collects/typed-scheme/infer/infer-unit.ss +++ b/collects/typed-scheme/infer/infer-unit.ss @@ -393,6 +393,10 @@ [((Result: s f o) (Result: t f o)) (cg s t)] + ;; handle the trivial case where we need to filters/etc + [((Result: s f o) + (Result: t (LFilterSet: '() '()) (LEmpty:))) + (cg s t)] [(_ _) (cond [(subtype S T) empty] ;; or, nothing worked, and we fail @@ -452,6 +456,7 @@ (define (infer X S T R must-vars [expected #f]) (with-handlers ([exn:infer? (lambda _ #f)]) (let ([cs (cgen/list null X S T)]) + ;(printf "cs: ~a~n" cs) (if (not expected) (subst-gen cs R must-vars) (subst-gen (cset-meet cs (cgen null X R expected)) R must-vars))))) @@ -486,4 +491,4 @@ (define (i s t r) (infer/simple (list s) (list t) r)) -;(trace cgen subst-gen) +;(trace cgen/list) diff --git a/collects/typed-scheme/typecheck/tc-app.ss b/collects/typed-scheme/typecheck/tc-app.ss index 9d3be77b06..5ce4164805 100644 --- a/collects/typed-scheme/typecheck/tc-app.ss +++ b/collects/typed-scheme/typecheck/tc-app.ss @@ -259,7 +259,7 @@ (fv (car rngs*)))) => (lambda (substitution) (do-ret (subst-all substitution (car rngs*))))] ;; ... function, ... arg - [(and (car drests*) + [(and (car drests*) tail-bound (eq? tail-bound (cdr (car drests*))) (= (length (car doms*)) @@ -316,7 +316,7 @@ tail-bound (eq? tail-bound (cdr (car drests*))) (= (length (car doms*)) - (length arg-tys)) + (length arg-tys)) (infer vars (cons tail-ty arg-tys) (cons (car (car drests*)) (car doms*)) (car rngs*) (fv (car rngs*)))) => (lambda (substitution) (do-ret (subst-all substitution (car rngs*))))]