From 3c78f7a0c8bc80efe0709b3aeaa9bd268c9ed83a Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 6 May 2014 16:23:56 -0400 Subject: [PATCH] Allow TR contracts to be turned on with an env variable. --- .../typed-racket-lib/typed-racket/utils/utils.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/utils/utils.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/utils/utils.rkt index 7403fd5855..36a6a8b04e 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/utils/utils.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/utils/utils.rkt @@ -20,7 +20,7 @@ at least theoretically. rep utils typecheck infer env private types static-contracts) (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 (if enable-contracts? @@ -198,5 +198,5 @@ at least theoretically. #:property prop:procedure (lambda (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))