Remove tc/lambda/check.

original commit: 0feefd347edfd7ce71045a63b57bf21a8bf97aba
This commit is contained in:
Eric Dobson 2014-05-13 00:34:00 -07:00
parent c8d2cfd42b
commit 4e4fc660c7
3 changed files with 5 additions and 18 deletions

View File

@ -34,8 +34,7 @@
([cond-contracted tc/#%expression ((syntax?) ((or/c tc-results/c #f)) . ->* . full-tc-results/c)]))
(define-signature tc-lambda^
([cond-contracted tc/lambda (syntax? syntax? syntax? . -> . full-tc-results/c)]
[cond-contracted tc/lambda/check (syntax? syntax? syntax? tc-results/c . -> . full-tc-results/c)]
([cond-contracted tc/lambda (syntax? syntax? syntax? (or/c tc-results/c #f) . -> . full-tc-results/c)]
[cond-contracted tc/rec-lambda/check (syntax? syntax? syntax? (listof Type/c) tc-results/c . -> .
(values full-tc-results/c full-tc-results/c))]))

View File

@ -162,13 +162,9 @@
[(if tst thn els) (tc/if-twoarm #'tst #'thn #'els expected)]
;; lambda
[(#%plain-lambda formals . body)
(if expected
(tc/lambda/check form #'(formals) #'(body) expected)
(tc/lambda form #'(formals) #'(body)))]
(tc/lambda form #'(formals) #'(body) expected)]
[(case-lambda [formals . body] ...)
(if expected
(tc/lambda/check form #'(formals ...) #'(body ...) expected)
(tc/lambda form #'(formals ...) #'(body ...)))]
(tc/lambda form #'(formals ...) #'(body ...) expected)]
;; send
[(let-values (((_) meth))
(let-values (((_) rcvr))

View File

@ -509,8 +509,8 @@
(make-Poly #:original-names (first tvarss) ns results))]))
;; typecheck a sequence of case-lambda clauses, which is possibly polymorphic
;; tc/lambda/internal syntax syntax-list syntax-list option[type] -> tc-result
(define (tc/lambda/internal form formals bodies expected)
;; tc/lambda : syntax syntax-list syntax-list (or/c tc-results #f) -> tc-results
(define (tc/lambda form formals bodies expected)
(if (or (has-poly-annotation? form)
(match expected
[(tc-result1: t) (or (Poly? t) (PolyDots? t) (PolyRow? t))]
@ -518,14 +518,6 @@
(ret (tc/plambda form (get-poly-tvarss form) formals bodies expected) -true-filter)
(ret (tc/mono-lambda/type formals bodies expected) -true-filter)))
;; tc/lambda : syntax syntax-list syntax-list -> tc-result
(define (tc/lambda form formals bodies)
(tc/lambda/internal form formals bodies #f))
;; tc/lambda/check : syntax syntax-list syntax-list Type -> tc-result
(define (tc/lambda/check form formals bodies expected)
(tc/lambda/internal form formals bodies expected))
;; formals : the formal arguments to the loop
;; body : a block containing the body of the loop
;; name : the name of the loop