make vectorof also try less hard during or/c checking

This commit is contained in:
Robby Findler 2015-12-22 15:49:44 -06:00
parent 8a9408306b
commit d2233f95e2

View File

@ -62,10 +62,15 @@
(fail val '(expected "an mutable vector" given: "~e" val)))] (fail val '(expected "an mutable vector" given: "~e" val)))]
[else (void)]) [else (void)])
(when first-order? (when first-order?
(for ([e (in-vector val)] (let loop ([n 0])
[n (in-naturals)]) (cond
[(= n (vector-length val))
(void)]
[else
(define e (vector-ref val n))
(unless (contract-first-order-passes? elem-ctc e) (unless (contract-first-order-passes? elem-ctc e)
(fail val '(expected: "~s for element ~s" given: "~e") (contract-name elem-ctc) n e)))) (fail val '(expected: "~s for element ~s" given: "~e") (contract-name elem-ctc) n e))
(contract-first-order-try-less-hard (loop (+ n 1)))])))
#t))) #t)))
(define (check-late-neg-vectorof c) (define (check-late-neg-vectorof c)