Move to open-Values instead of open-Result.
original commit: 2922440fdda68ed4d62a5cc82b8c397ac56edd15
This commit is contained in:
parent
0e7dae36e5
commit
cdb16d29e7
|
@ -45,24 +45,11 @@
|
|||
;; objects yet.
|
||||
(let-values
|
||||
([(o-a t-a) (for/lists (os ts)
|
||||
([nm (in-range dom-count)]
|
||||
([_ (in-range dom-count)]
|
||||
[oa (in-sequence-forever (in-list o-a) -empty-obj)]
|
||||
[ta (in-sequence-forever (in-list t-a) #f)])
|
||||
[ta (in-sequence-forever (in-list t-a) Univ)])
|
||||
(values oa ta))])
|
||||
(match rng
|
||||
[(AnyValues: f) (tc-any-results f)]
|
||||
[(Values: results)
|
||||
(define-values (t-r f-r o-r)
|
||||
(for/lists (t-r f-r o-r)
|
||||
([r (in-list results)])
|
||||
(open-Result r o-a t-a)))
|
||||
(ret t-r f-r o-r)]
|
||||
[(ValuesDots: results dty dbound)
|
||||
(define-values (t-r f-r o-r)
|
||||
(for/lists (t-r f-r o-r)
|
||||
([r (in-list results)])
|
||||
(open-Result r o-a t-a)))
|
||||
(ret t-r f-r o-r dty dbound)])))]
|
||||
(open-Values rng o-a t-a)))]
|
||||
;; this case should only match if the function type has mandatory keywords
|
||||
;; but no keywords were provided in the application
|
||||
[((arr: _ _ _ _
|
||||
|
|
|
@ -9,11 +9,30 @@
|
|||
(except-in (types abbrev utils filter-ops) -> ->* one-of/c)
|
||||
(rep type-rep object-rep filter-rep rep-utils))
|
||||
|
||||
(provide open-Result add-scope values->tc-results)
|
||||
(provide add-scope values->tc-results)
|
||||
|
||||
(provide/cond-contract
|
||||
[open-Values (-> SomeValues/c (listof Object?) (listof Type/c) -> full-tc-results/c)]
|
||||
[replace-names (-> (listof (list/c identifier? Object?)) tc-results/c tc-results/c)])
|
||||
|
||||
(define (open-Values v os ts)
|
||||
(match v
|
||||
[(AnyValues: f)
|
||||
(tc-any-results f)]
|
||||
[(Values: results)
|
||||
(define-values (t-r f-r o-r)
|
||||
(for/lists (t-r f-r o-r)
|
||||
([r (in-list results)])
|
||||
(open-Result r os ts)))
|
||||
(ret t-r f-r o-r)]
|
||||
[(ValuesDots: results dty dbound)
|
||||
(define-values (t-r f-r o-r)
|
||||
(for/lists (t-r f-r o-r)
|
||||
([r (in-list results)])
|
||||
(open-Result r os ts)))
|
||||
(ret t-r f-r o-r dty dbound)]))
|
||||
|
||||
|
||||
;; Substitutes the given objects into the type, filters, and object
|
||||
;; of a Result for function application. This matches up to the substitutions
|
||||
;; in the T-App rule from the ICFP paper.
|
||||
|
|
Loading…
Reference in New Issue
Block a user