make impersonator vector contracts use impersonate-vector, not chaperone-vector
closes #1198
This commit is contained in:
parent
c24ddb4a7c
commit
3e53a3ea42
|
@ -1,7 +1,8 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require "test-util.rkt")
|
(require "test-util.rkt")
|
||||||
(parameterize ([current-contract-namespace
|
(parameterize ([current-contract-namespace
|
||||||
(make-basic-contract-namespace)])
|
(make-basic-contract-namespace
|
||||||
|
'racket/contract/combinator)])
|
||||||
|
|
||||||
(test/spec-passed
|
(test/spec-passed
|
||||||
'vectorof1
|
'vectorof1
|
||||||
|
@ -137,4 +138,14 @@
|
||||||
'(let ([x (vector-immutable 1 2 3)])
|
'(let ([x (vector-immutable 1 2 3)])
|
||||||
(eq? (contract (vectorof integer?) x 'pos 'neg)
|
(eq? (contract (vectorof integer?) x 'pos 'neg)
|
||||||
x))
|
x))
|
||||||
'#true))
|
'#true)
|
||||||
|
|
||||||
|
(test/spec-passed/result
|
||||||
|
'vector/c-impersonator
|
||||||
|
'(vector-ref (contract (vectorof (make-contract #:late-neg-projection (λ (b) (λ (x n) (+ x 1)))))
|
||||||
|
(vector 0)
|
||||||
|
'pos 'neg)
|
||||||
|
0)
|
||||||
|
1)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
|
@ -218,7 +218,7 @@
|
||||||
#:name vectorof-name
|
#:name vectorof-name
|
||||||
#:first-order vectorof-first-order
|
#:first-order vectorof-first-order
|
||||||
#:stronger vectorof-stronger
|
#:stronger vectorof-stronger
|
||||||
#:late-neg-projection (vectorof-late-neg-ho-projection chaperone-vector)))
|
#:late-neg-projection (vectorof-late-neg-ho-projection impersonate-vector)))
|
||||||
|
|
||||||
(define-syntax (wrap-vectorof stx)
|
(define-syntax (wrap-vectorof stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user