Fix contract-stronger? to work with late-neg projections.
This commit is contained in:
parent
e6a0caa147
commit
640895645f
|
@ -26,6 +26,14 @@
|
|||
(define (call*2 f1 x0) (f1 x0))
|
||||
(define (call*3 f2 x1 x0) (f2 x1 x0))))
|
||||
|
||||
;; the two are incomparable, but we still want to check, to make sure
|
||||
;; contract-stronger works on contracts that use different kinds of
|
||||
;; projections (late-neg for any/c, regular for proj:blame/c)
|
||||
(test/spec-passed/result
|
||||
'stronger-with-no-late-neg-projection
|
||||
'(contract-stronger? proj:blame/c any/c)
|
||||
#f)
|
||||
|
||||
(test/spec-passed/result
|
||||
'opt/c-blame-0
|
||||
'((contract
|
||||
|
|
|
@ -497,9 +497,10 @@
|
|||
v)))))
|
||||
|
||||
(define (as-strong? a b)
|
||||
(procedure-closure-contents-eq?
|
||||
(contract-struct-projection a)
|
||||
(contract-struct-projection b)))
|
||||
(define late-neg-a (contract-struct-late-neg-projection a))
|
||||
(define late-neg-b (contract-struct-late-neg-projection b))
|
||||
(and late-neg-a late-neg-b
|
||||
(procedure-closure-contents-eq? late-neg-a late-neg-b)))
|
||||
|
||||
(define make-contract
|
||||
(procedure-rename
|
||||
|
@ -549,4 +550,4 @@
|
|||
;; raises a blame error if val doesn't satisfy the first-order checks for the function
|
||||
;; accepts-arglist : (-> (listof keyword?)[sorted by keyword<?] exact-nonnegative-integer? boolean?)
|
||||
(struct arrow-contract-info (chaperone-procedure check-first-order accepts-arglist)
|
||||
#:transparent)
|
||||
#:transparent)
|
||||
|
|
Loading…
Reference in New Issue
Block a user