allow field/c to blame positive party

This commit is contained in:
Sam Caldwell 2016-07-18 15:17:17 -04:00
parent a046bd0f23
commit 0fb5fa52f4
1 changed files with 3 additions and 2 deletions

View File

@ -123,11 +123,12 @@
(define proc (get/build-late-neg-projection ctc))
(define blame/c (blame-add-context blame "the field of"))
(define proj (proc (blame-swap blame/c)))
(define proj-pos (lambda (x) (proj x (blame-positive blame))))
(lambda (f neg-party)
(define proj-with-blame (lambda (x) (proj x neg-party)))
(define proj-neg (lambda (x) (proj x neg-party)))
(cond
[(field-handle? f)
(make-field-proxy f proj-with-blame proj-with-blame)]
(make-field-proxy f proj-neg proj-pos)]
[else (raise-blame-error blame/c
#:missing-party neg-party
f