Allow TR contracts to be turned on with an env variable.
This commit is contained in:
parent
c324854e0e
commit
3c78f7a0c8
|
@ -20,7 +20,7 @@ at least theoretically.
|
||||||
rep utils typecheck infer env private types static-contracts)
|
rep utils typecheck infer env private types static-contracts)
|
||||||
|
|
||||||
(define optimize? (make-parameter #t))
|
(define optimize? (make-parameter #t))
|
||||||
(define-for-syntax enable-contracts? #f)
|
(define-for-syntax enable-contracts? (and (getenv "PLT_TR_CONTRACTS") #t))
|
||||||
|
|
||||||
(define-syntax do-contract-req
|
(define-syntax do-contract-req
|
||||||
(if enable-contracts?
|
(if enable-contracts?
|
||||||
|
@ -198,5 +198,5 @@ at least theoretically.
|
||||||
#:property prop:procedure
|
#:property prop:procedure
|
||||||
(lambda (ins stx)
|
(lambda (ins stx)
|
||||||
(self-ctor-transformer (struct-info-self-ctor-id ins) stx))
|
(self-ctor-transformer (struct-info-self-ctor-id ins) stx))
|
||||||
#:property prop:struct-info (lambda (x) (extract-struct-info (struct-info-self-ctor-info x))))
|
#:property prop:struct-info (λ (x) (extract-struct-info (struct-info-self-ctor-info x))))
|
||||||
struct-info-self-ctor))
|
struct-info-self-ctor))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user