Refactor define-values for contract definition

This worked by accident and added an extraneous function
definition and call. Refactor to avoid that.
This commit is contained in:
Asumu Takikawa 2015-10-27 23:07:18 -04:00
parent d7ae7dbdd8
commit 0d4b2fb3f7

View File

@ -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