start fixing up the exports to match the docs for racket/contract

This commit is contained in:
Robby Findler 2011-04-12 21:22:57 -05:00
parent 06ed61c0d2
commit 2bceaec03a
4 changed files with 3 additions and 53 deletions

View File

@ -56,7 +56,6 @@
(provide
opt/c define-opt/c ;(all-from "private/contract-opt.rkt")
(except-out (all-from-out racket/contract/private/ds)
lazy-depth-to-look
contract-struct)
(all-from-out racket/contract/private/base)

View File

@ -15,6 +15,5 @@
(all-from-out racket/contract/regions)
(all-from-out "contract/private/legacy.rkt")
(except-out (all-from-out "contract/private/ds.rkt")
lazy-depth-to-look))
(all-from-out "contract/private/ds.rkt"))

View File

@ -27,17 +27,7 @@ it around flattened out.
(for-syntax "opt-guts.rkt"))
(provide define-contract-struct
contract-struct
make-opt-contract/info
;set-opt-contract/info-enforcer!
opt-contract/info-contract
opt-contract/info-id
opt-contract/info-enforcer
lazy-depth-to-look
unknown?
synthesized-value)
contract-struct)
;; main : syntax syntax[list-of-identifier] syntax boolean -> syntax
;; define-struct? tells us if this is a 'contract-struct' or a 'define-contract-struct'

View File

@ -4,15 +4,7 @@
(provide make-proj-contract
raise-contract-error
contract-proc
proj-prop proj-get proj-pred?
name-prop name-get name-pred?
stronger-prop stronger-get stronger-pred?
first-order-prop first-order-get first-order-pred?
flat-prop flat-get flat-pred?
)
contract-proc)
(define (raise-contract-error x src pos name fmt . args)
(apply raise-blame-error
@ -60,36 +52,6 @@
(unpack-blame (if original? neg pos))
original?)))))
(define (legacy-property name)
(define-values [ prop pred get ]
(make-struct-type-property
name
(lambda (impl info)
(error
name
(string-append
"this property is a legacy implementation; "
"use prop:contract or prop:flat-contract instead.")))))
prop)
(define proj-prop (legacy-property 'proj-prop))
(define name-prop (legacy-property 'name-prop))
(define stronger-prop (legacy-property 'stronger-prop))
(define first-order-prop (legacy-property 'first-order-prop))
(define flat-prop (legacy-property 'flat-prop))
(define proj-pred? contract-struct?)
(define name-pred? contract-struct?)
(define stronger-pred? contract-struct?)
(define first-order-pred? contract-struct?)
(define flat-pred? contract-struct?)
(define (proj-get c) contract-proc)
(define (name-get c) contract-name)
(define (stronger-get c) contract-stronger?)
(define (first-order-get c) contract-first-order)
(define (flat-get c) flat-contract-predicate)
;; unpack-blame : any/c -> any/c
;; Constructs an S-expression for use in the blame error messages.
;; A variable reference represents a module or top-level context.