diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/signatures.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/signatures.rkt index bc6c0fff..22474b4b 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/signatures.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/signatures.rkt @@ -40,8 +40,7 @@ (values full-tc-results/c full-tc-results/c))])) (define-signature tc-app^ - ([cond-contracted tc/app (syntax? . -> . full-tc-results/c)] - [cond-contracted tc/app/check (syntax? tc-results/c . -> . full-tc-results/c)] + ([cond-contracted tc/app (syntax? (or/c tc-results/c #f) . -> . full-tc-results/c)] [cond-contracted tc/app-regular (syntax? (or/c tc-results/c #f) . -> . full-tc-results/c)])) (define-signature tc-apply^ diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt index a047523f..b6b4da03 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt @@ -130,7 +130,7 @@ #:when (eq? 'vector (Type-key t))) t)) (match u-ts - [(list t0) (tc/app/check #'(#%plain-app . form) (ret t0))] + [(list t0) (tc/app #'(#%plain-app . form) (ret t0))] [_ (continue)])] ;; since vectors are mutable, if there is no expected type, we want to generalize the element type [(or #f (tc-any-results: _) (tc-result1: _)) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-main.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-main.rkt index 064fcbe4..a6469364 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-main.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-main.rkt @@ -37,8 +37,8 @@ tc/app-regular*) ;; the main dispatching function -;; syntax tc-results/c -> tc-results/c -(define (tc/app/internal form expected) +;; syntax (or/c tc-results/c #f) -> tc-results/c +(define (tc/app form expected) (syntax-parse form [(#%plain-app . (~var v (tc/app-special-cases expected))) ((attribute v.check))])) @@ -95,11 +95,3 @@ (single-value a)))] [_ (map single-value args*)])) (tc/funapp #'f #'args f-ty arg-tys expected))])) - -;(trace tc/app/internal) - -;; syntax -> tc-results -(define (tc/app form) (tc/app/internal form #f)) - -;; syntax tc-results/c -> tc-results/c -(define (tc/app/check form expected) (tc/app/internal form expected)) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt index c1621c6d..09af8551 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt @@ -142,10 +142,7 @@ ;(tc-expr/check #'e3 expected) (tc-error/expr "with-continuation-mark requires a continuation-mark-key, but got ~a" key-t)])] ;; application - [(#%plain-app . _) - (if expected - (tc/app/check form expected) - (tc/app form))] + [(#%plain-app . _) (tc/app form expected)] ;; #%expression [(#%expression e) (tc/#%expression form expected)] ;; syntax