Remove bad branch it tc-lambda, and support code in values->tc-results.
The branch was bad because Values is not a valid Type/c. original commit: 8d7f12a793bfe0e98484606f730517ec30451d8c
This commit is contained in:
parent
cbec4bd4e5
commit
b9b038bfb9
|
@ -423,7 +423,6 @@
|
|||
(match expected
|
||||
[(tc-result1: (or (Poly: _ _) (PolyDots: _ _) (PolyRow: _ _ _)))
|
||||
(tc/plambda form (remove-poly-layer tvarss-list) formals bodies expected)]
|
||||
[(tc-result1: (and v (Values: _))) (maybe-loop form formals bodies (values->tc-results v #f))]
|
||||
[_
|
||||
(define remaining-layers (remove-poly-layer tvarss-list))
|
||||
(if (null? remaining-layers)
|
||||
|
|
|
@ -220,27 +220,23 @@
|
|||
|
||||
;; Convert a Values to a corresponding tc-results
|
||||
(define/cond-contract (values->tc-results tc formals)
|
||||
(SomeValues/c (or/c #f (listof identifier?)) . -> . tc-results/c)
|
||||
(SomeValues/c (listof identifier?) . -> . tc-results/c)
|
||||
(match tc
|
||||
[(AnyValues: f) (tc-any-results f)]
|
||||
[(ValuesDots: (list (and rs (Result: ts fs os)) ...) dty dbound)
|
||||
(if formals
|
||||
(let-values ([(ts fs os)
|
||||
(for/lists (ts fs os) ([r (in-list rs)])
|
||||
(open-Result r (map (lambda (i) (make-Path null i))
|
||||
formals)))])
|
||||
(ret ts fs os
|
||||
(for/fold ([dty dty]) ([(o idx) (in-indexed (in-list formals))])
|
||||
(define key (list 0 idx))
|
||||
(subst-type dty key (make-Path null o) #t))
|
||||
dbound))
|
||||
(ret ts fs os dty dbound))]
|
||||
(let-values ([(ts fs os)
|
||||
(for/lists (ts fs os) ([r (in-list rs)])
|
||||
(open-Result r (map (lambda (i) (make-Path null i))
|
||||
formals)))])
|
||||
(ret ts fs os
|
||||
(for/fold ([dty dty]) ([(o idx) (in-indexed (in-list formals))])
|
||||
(define key (list 0 idx))
|
||||
(subst-type dty key (make-Path null o) #t))
|
||||
dbound))]
|
||||
[(Values: (list (and rs (Result: ts fs os)) ...))
|
||||
(if formals
|
||||
(let-values ([(ts fs os)
|
||||
(for/lists (ts fs os) ([r (in-list rs)])
|
||||
(open-Result r (map (lambda (i) (make-Path null i))
|
||||
formals)))])
|
||||
(ret ts fs os))
|
||||
(ret ts fs os))]))
|
||||
(let-values ([(ts fs os)
|
||||
(for/lists (ts fs os) ([r (in-list rs)])
|
||||
(open-Result r (map (lambda (i) (make-Path null i))
|
||||
formals)))])
|
||||
(ret ts fs os))]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user