create the blame+neg-party pair only once, not once for the domain
and once for the range
This commit is contained in:
parent
49c4d9272f
commit
b7f500fc26
|
@ -252,12 +252,13 @@
|
||||||
(define let-values-clause
|
(define let-values-clause
|
||||||
#`[#,(reverse args-vars)
|
#`[#,(reverse args-vars)
|
||||||
(with-continuation-mark contract-continuation-mark-key
|
(with-continuation-mark contract-continuation-mark-key
|
||||||
(cons blame neg-party)
|
blame+neg-party
|
||||||
(values #,@(reverse args-expressions)))])
|
(values #,@(reverse args-expressions)))])
|
||||||
|
|
||||||
(define the-clause
|
(define the-clause
|
||||||
(if rngs
|
(if rngs
|
||||||
#`[#,the-args
|
#`[#,the-args
|
||||||
|
(let ([blame+neg-party (cons blame neg-party)])
|
||||||
pre-check ...
|
pre-check ...
|
||||||
(define-values (failed res-x ...)
|
(define-values (failed res-x ...)
|
||||||
(call-with-values
|
(call-with-values
|
||||||
|
@ -270,7 +271,7 @@
|
||||||
(values args #,@(map (λ (x) #'#f)
|
(values args #,@(map (λ (x) #'#f)
|
||||||
(syntax->list #'(res-x ...))))])))
|
(syntax->list #'(res-x ...))))])))
|
||||||
(with-continuation-mark contract-continuation-mark-key
|
(with-continuation-mark contract-continuation-mark-key
|
||||||
(cons blame neg-party)
|
blame+neg-party
|
||||||
(cond
|
(cond
|
||||||
[failed
|
[failed
|
||||||
(wrong-number-of-results-blame
|
(wrong-number-of-results-blame
|
||||||
|
@ -281,11 +282,12 @@
|
||||||
#'(res-x ...))))]
|
#'(res-x ...))))]
|
||||||
[else
|
[else
|
||||||
post-check ...
|
post-check ...
|
||||||
(values ((rb res-x) neg-party) ...)]))]
|
(values ((rb res-x) neg-party) ...)])))]
|
||||||
#`[#,the-args
|
#`[#,the-args
|
||||||
pre-check ...
|
pre-check ...
|
||||||
|
(let ([blame+neg-party (cons blame neg-party)])
|
||||||
(let-values (#,let-values-clause)
|
(let-values (#,let-values-clause)
|
||||||
#,full-call)]))
|
#,full-call))]))
|
||||||
(cons the-clause
|
(cons the-clause
|
||||||
(cond
|
(cond
|
||||||
[(null? optional-args) '()]
|
[(null? optional-args) '()]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user