Remove tc/lambda/check.
This commit is contained in:
parent
ff1a852caf
commit
0feefd347e
|
@ -34,8 +34,7 @@
|
||||||
([cond-contracted tc/#%expression ((syntax?) ((or/c tc-results/c #f)) . ->* . full-tc-results/c)]))
|
([cond-contracted tc/#%expression ((syntax?) ((or/c tc-results/c #f)) . ->* . full-tc-results/c)]))
|
||||||
|
|
||||||
(define-signature tc-lambda^
|
(define-signature tc-lambda^
|
||||||
([cond-contracted tc/lambda (syntax? syntax? syntax? . -> . full-tc-results/c)]
|
([cond-contracted tc/lambda (syntax? syntax? syntax? (or/c tc-results/c #f) . -> . full-tc-results/c)]
|
||||||
[cond-contracted tc/lambda/check (syntax? syntax? syntax? tc-results/c . -> . full-tc-results/c)]
|
|
||||||
[cond-contracted tc/rec-lambda/check (syntax? syntax? syntax? (listof Type/c) 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))]))
|
(values full-tc-results/c full-tc-results/c))]))
|
||||||
|
|
||||||
|
|
|
@ -162,13 +162,9 @@
|
||||||
[(if tst thn els) (tc/if-twoarm #'tst #'thn #'els expected)]
|
[(if tst thn els) (tc/if-twoarm #'tst #'thn #'els expected)]
|
||||||
;; lambda
|
;; lambda
|
||||||
[(#%plain-lambda formals . body)
|
[(#%plain-lambda formals . body)
|
||||||
(if expected
|
(tc/lambda form #'(formals) #'(body) expected)]
|
||||||
(tc/lambda/check form #'(formals) #'(body) expected)
|
|
||||||
(tc/lambda form #'(formals) #'(body)))]
|
|
||||||
[(case-lambda [formals . body] ...)
|
[(case-lambda [formals . body] ...)
|
||||||
(if expected
|
(tc/lambda form #'(formals ...) #'(body ...) expected)]
|
||||||
(tc/lambda/check form #'(formals ...) #'(body ...) expected)
|
|
||||||
(tc/lambda form #'(formals ...) #'(body ...)))]
|
|
||||||
;; send
|
;; send
|
||||||
[(let-values (((_) meth))
|
[(let-values (((_) meth))
|
||||||
(let-values (((_) rcvr))
|
(let-values (((_) rcvr))
|
||||||
|
|
|
@ -509,8 +509,8 @@
|
||||||
(make-Poly #:original-names (first tvarss) ns results))]))
|
(make-Poly #:original-names (first tvarss) ns results))]))
|
||||||
|
|
||||||
;; typecheck a sequence of case-lambda clauses, which is possibly polymorphic
|
;; typecheck a sequence of case-lambda clauses, which is possibly polymorphic
|
||||||
;; tc/lambda/internal syntax syntax-list syntax-list option[type] -> tc-result
|
;; tc/lambda : syntax syntax-list syntax-list (or/c tc-results #f) -> tc-results
|
||||||
(define (tc/lambda/internal form formals bodies expected)
|
(define (tc/lambda form formals bodies expected)
|
||||||
(if (or (has-poly-annotation? form)
|
(if (or (has-poly-annotation? form)
|
||||||
(match expected
|
(match expected
|
||||||
[(tc-result1: t) (or (Poly? t) (PolyDots? t) (PolyRow? t))]
|
[(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/plambda form (get-poly-tvarss form) formals bodies expected) -true-filter)
|
||||||
(ret (tc/mono-lambda/type 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
|
;; formals : the formal arguments to the loop
|
||||||
;; body : a block containing the body of the loop
|
;; body : a block containing the body of the loop
|
||||||
;; name : the name of the loop
|
;; name : the name of the loop
|
||||||
|
|
Loading…
Reference in New Issue
Block a user