diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/private/type-annotation.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/private/type-annotation.rkt index 5df50ebb..3347e0be 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/private/type-annotation.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/private/type-annotation.rkt @@ -93,10 +93,10 @@ (combine-results (for/list ([stx (in-list stxs)] [ty (in-list tys)] [a (in-list anns)] [f (in-list fs)] [o (in-list os)]) - (cond [a (check-type stx ty a) (ret a f o)] + (cond [a (check-type stx ty a) (tc-result a f o)] ;; mutated variables get generalized, so that we don't infer too small a type - [(is-var-mutated? stx) (ret (generalize ty) f o)] - [else (ret ty f o)]))))]))))])) + [(is-var-mutated? stx) (tc-result (generalize ty) f o)] + [else (tc-result ty f o)]))))]))))])) ;; check that e-type is compatible with ty in context of stx ;; otherwise, error diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/tc-result.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/tc-result.rkt index 40e2fa85..a76c563c 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/tc-result.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/tc-result.rkt @@ -94,9 +94,9 @@ (define (-tc-result type filter object) (cond [(or (equal? type -Bottom) (equal? filter -bot-filter)) - (make-tc-result -Bottom -bot-filter object)] + (tc-result -Bottom -bot-filter object)] [else - (make-tc-result type filter object)])) + (tc-result type filter object)])) ;; convenience function for returning the result of typechecking an expression @@ -148,7 +148,7 @@ (define (combine-results tcs) (match tcs - [(list (tc-result1: t f o) ...) + [(list (tc-result: t f o) ...) (ret t f o)])) (define tc-result-equal? equal?) @@ -156,8 +156,8 @@ (provide tc-result: tc-results: tc-any-results: tc-result1: Result1: Results: tc-results) (provide/cond-contract - [tc-result (Type/c FilterSet/c Object? . c:-> . tc-result?)] - [combine-results ((c:listof tc-results?) . c:-> . tc-results?)] + [rename -tc-result tc-result (Type/c FilterSet/c Object? . c:-> . tc-result?)] + [combine-results ((c:listof tc-result?) . c:-> . tc-results?)] [tc-any-results ((c:or/c Filter/c NoFilter?) . c:-> . tc-any-results?)] [tc-result-t (tc-result? . c:-> . Type/c)] [rename tc-results-ts* tc-results-ts (tc-results? . c:-> . (c:listof Type/c))]