avoid call to coerce-contract when we know it is already a contract

This commit is contained in:
Robby Findler 2017-02-05 14:36:08 -06:00
parent 8c5c8da1a7
commit 84048f6776

View File

@ -314,7 +314,9 @@
#`(begin #`(begin
(define contract-id (define contract-id
;; let is here to give the right name. ;; let is here to give the right name.
(let ([#,ex-id (coerce-contract '#,contract-error-name ctrct) (let ([#,ex-id #,(if arrow?
#'ctrct
#`(coerce-contract '#,contract-error-name ctrct))
#;(opt/c ctrct #:error-name #,contract-error-name)]) #;(opt/c ctrct #:error-name #,contract-error-name)])
#,ex-id)) #,ex-id))