Fix Typed Racket build with contracts enabled.

original commit: 1abb027fc7fdf238ab0086d9d0f73aa920175431
This commit is contained in:
Sam Tobin-Hochstadt 2012-04-04 09:47:47 -04:00
parent be06428db5
commit 0cfa940a0e
5 changed files with 8 additions and 7 deletions

View File

@ -4,10 +4,11 @@
(rep type-rep)
(utils tc-utils)
(env global-env)
(except-in (types subtype union convenience resolve utils comparison) -> ->*)
(except-in (types subtype union convenience resolve utils comparison) -> ->* one-of/c)
(private parse-type)
(contract-req)
racket/match mzlib/trace)
(provide type-annotation
get-type
get-types

View File

@ -2,6 +2,7 @@
(require "../utils/utils.rkt"
mzlib/pconvert
racket/match
(contract-req)
"free-variance.rkt"
"interning.rkt"
unstable/match unstable/struct
@ -11,7 +12,7 @@
(except-in syntax/parse id identifier keyword)
racket/base
syntax/struct
racket/contract
(contract-req)
racket/syntax
(rename-in (except-in (utils stxclass-util) bytes byte-regexp regexp byte-pregexp pregexp)
[id* id]

View File

@ -374,7 +374,7 @@
(def-type Hashtable ([key Type/c] [value Type/c]) [#:key 'hash]
[#:frees (λ (f) (combine-frees (list (make-invariant (f key)) (make-invariant (f value)))))])
(def-type Refinement ([parent Type/c] [pred identifier?] [cert certifier?])
(def-type Refinement ([parent Type/c] [pred identifier?] [cert procedure?])
[#:key (Type-key parent)]
[#:intern (list (Rep-seq parent) (hash-id pred))]
[#:fold-rhs (*Refinement (type-rec-id parent) pred cert)]

View File

@ -3,7 +3,7 @@
(require "../utils/utils.rkt"
(rep type-rep rep-utils)
(utils tc-utils)
(contract-req)
(prefix-in c: (contract-req))
(types utils subtype abbrev printer comparison)
racket/match)

View File

@ -30,7 +30,7 @@ at least theoretically.
(define-syntax do-contract-req
(if enable-contracts?
(syntax-rules () [(_) (require racket/contract/base)])
(lambda (stx) (datum->syntax stx '(require racket/contract/base)))
(syntax-rules () [(_) (begin)])))
(do-contract-req)
@ -189,8 +189,7 @@ at least theoretically.
(define-require-syntax contract-req
(if enable-contracts?
(syntax-rules ()
[(_) racket/contract])
(lambda (stx) (datum->syntax stx 'racket/contract))
(syntax-rules ()
[(_) (combine-in)])))