From 0d4b2fb3f724b349889dc598865f9655397921be Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Tue, 27 Oct 2015 23:07:18 -0400 Subject: [PATCH] Refactor `define-values` for contract definition This worked by accident and added an extraneous function definition and call. Refactor to avoid that. --- typed-racket-lib/typed-racket/private/type-contract.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typed-racket-lib/typed-racket/private/type-contract.rkt b/typed-racket-lib/typed-racket/private/type-contract.rkt index cafa333b..2c8d08ba 100644 --- a/typed-racket-lib/typed-racket/private/type-contract.rkt +++ b/typed-racket-lib/typed-racket/private/type-contract.rkt @@ -111,7 +111,7 @@ (λ (#:reason [reason #f]) (set! failure-reason reason)))) (syntax-parse stx #:literal-sets (kernel-literals) - [(define-values ctc-id _) + [(define-values (ctc-id) _) ;; no need for ignore, the optimizer doesn't run on this code (cond [failure-reason #`(define-syntax (#,untyped-id stx) @@ -123,7 +123,7 @@ [else (match-define (list defs ctc) result) #`(begin #,@defs - (define ctc-id #,ctc) + (define-values (ctc-id) #,ctc) (define-module-boundary-contract #,untyped-id #,orig-id ctc-id #:pos-source #,blame-id