From 3b1e535049f57516ee3284ff90a8f561ca5e0c6b Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 19 Dec 2015 17:34:10 -0600 Subject: [PATCH] port recursive-contract to late-neg --- .../collects/racket/contract/private/base.rkt | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/racket/collects/racket/contract/private/base.rkt b/racket/collects/racket/contract/private/base.rkt index 446bf538a6..3cdac2fe97 100644 --- a/racket/collects/racket/contract/private/base.rkt +++ b/racket/collects/racket/contract/private/base.rkt @@ -140,27 +140,27 @@ forced-ctc] [else current])) -(define (recursive-contract-projection ctc) +(define (recursive-contract-late-neg-projection ctc) (cond [(recursive-contract-list-contract? ctc) (λ (blame) (define r-ctc (force-recursive-contract ctc)) - (define f (contract-projection r-ctc)) + (define f (contract-late-neg-projection r-ctc)) (define blame-known (blame-add-context blame #f)) - (λ (val) + (λ (val neg-party) (unless (list? val) - (raise-blame-error blame-known + (raise-blame-error blame-known #:missing-party neg-party val '(expected: "list?" given: "~e") val)) - ((f blame-known) val)))] + ((f blame-known) val neg-party)))] [else (λ (blame) (define r-ctc (force-recursive-contract ctc)) - (define f (contract-projection r-ctc)) + (define f (contract-late-neg-projection r-ctc)) (define blame-known (blame-add-context blame #f)) - (λ (val) - ((f blame-known) val)))])) + (λ (val neg-party) + ((f blame-known) val neg-party)))])) (define (recursive-contract-stronger this that) (equal? this that)) @@ -187,7 +187,7 @@ (build-flat-contract-property #:name recursive-contract-name #:first-order recursive-contract-first-order - #:projection recursive-contract-projection + #:late-neg-projection recursive-contract-late-neg-projection #:stronger recursive-contract-stronger #:generate recursive-contract-generate #:list-contract? recursive-contract-list-contract?)) @@ -197,7 +197,7 @@ (build-chaperone-contract-property #:name recursive-contract-name #:first-order recursive-contract-first-order - #:projection recursive-contract-projection + #:late-neg-projection recursive-contract-late-neg-projection #:stronger recursive-contract-stronger #:generate recursive-contract-generate #:list-contract? recursive-contract-list-contract?)) @@ -207,7 +207,7 @@ (build-contract-property #:name recursive-contract-name #:first-order recursive-contract-first-order - #:projection recursive-contract-projection + #:late-neg-projection recursive-contract-late-neg-projection #:stronger recursive-contract-stronger #:generate recursive-contract-generate #:list-contract? recursive-contract-list-contract?))