fix contract provide ordering bug
This commit is contained in:
parent
a396880bda
commit
4bfebbda98
|
@ -11,13 +11,6 @@
|
|||
(for-template racket/base racket/contract/base)
|
||||
(for-syntax racket/base syntax/parse))
|
||||
|
||||
(provide/cond-contract
|
||||
[case->/sc ((listof arr-combinator?) . -> . static-contract?)]
|
||||
[arr/sc (-> (listof static-contract?)
|
||||
(or/c static-contract? #f)
|
||||
(or/c (listof static-contract?) #f)
|
||||
static-contract?)])
|
||||
|
||||
(provide case->/sc:
|
||||
arr/sc:
|
||||
(rename-out [arr-combinator? arr/sc?]))
|
||||
|
@ -98,3 +91,11 @@
|
|||
args
|
||||
(if rest (list rest) empty)
|
||||
(if range range empty))]))
|
||||
|
||||
|
||||
(provide/cond-contract
|
||||
[case->/sc ((listof arr-combinator?) . -> . static-contract?)]
|
||||
[arr/sc (-> (listof static-contract?)
|
||||
(or/c static-contract? #f)
|
||||
(or/c (listof static-contract?) #f)
|
||||
static-contract?)])
|
||||
|
|
|
@ -59,12 +59,6 @@
|
|||
contract-restrict-value
|
||||
kind-max-max)
|
||||
|
||||
(provide/cond-contract
|
||||
[exn:fail:constraint-failure? predicate/c]
|
||||
[exn:fail:constraint-failure-reason (exn:fail:constraint-failure? . -> . string?)]
|
||||
[validate-constraints (contract-restrict? . -> . void?)]
|
||||
[add-constraint (contract-restrict? contract-kind? . -> . contract-restrict?)])
|
||||
|
||||
(module structs racket/base
|
||||
(require "../utils/utils.rkt"
|
||||
(contract-req)
|
||||
|
@ -300,3 +294,10 @@
|
|||
(current-continuation-marks)
|
||||
(~a d)))]))
|
||||
|
||||
|
||||
(provide/cond-contract
|
||||
[exn:fail:constraint-failure? predicate/c]
|
||||
[exn:fail:constraint-failure-reason (exn:fail:constraint-failure? . -> . string?)]
|
||||
[validate-constraints (contract-restrict? . -> . void?)]
|
||||
[add-constraint (contract-restrict? contract-kind? . -> . contract-restrict?)])
|
||||
|
||||
|
|
|
@ -8,12 +8,6 @@
|
|||
(contract-req)
|
||||
racket/match)
|
||||
|
||||
(provide/cond-contract
|
||||
[contract-kind? predicate/c]
|
||||
[contract-kind<= (contract-kind? contract-kind? . -> . boolean?)]
|
||||
[kind->keyword (contract-kind? . -> . keyword?)]
|
||||
[combine-kinds ((contract-kind?) #:rest (listof contract-kind?) . ->* . contract-kind?)])
|
||||
|
||||
(define (contract-kind? v)
|
||||
(case v
|
||||
((flat chaperone impersonator) #t)
|
||||
|
@ -41,3 +35,9 @@
|
|||
((flat) '#:flat)
|
||||
((chaperone) '#:chaperone)
|
||||
((impersonator) '#:impersonator)))
|
||||
|
||||
(provide/cond-contract
|
||||
[contract-kind? predicate/c]
|
||||
[contract-kind<= (contract-kind? contract-kind? . -> . boolean?)]
|
||||
[kind->keyword (contract-kind? . -> . keyword?)]
|
||||
[combine-kinds ((contract-kind?) #:rest (listof contract-kind?) . ->* . contract-kind?)])
|
||||
|
|
Loading…
Reference in New Issue
Block a user