avoid #:name-for-blame on older versions

pull/8/head
AlexKnauth 6 years ago
parent 9ddb20c53c
commit 83b4afa10f

@ -6,7 +6,8 @@
(for-syntax racket/base (for-syntax racket/base
racket/syntax racket/syntax
syntax/parse syntax/parse
syntax/stx)) syntax/stx
version/utils))
;; (define+provide+safe+match name-id ;; (define+provide+safe+match name-id
;; contract-expr ;; contract-expr
@ -50,6 +51,10 @@
#:with internal-name (generate-temporary #'name) #:with internal-name (generate-temporary #'name)
#:with contract-name (generate-temporary #'name) #:with contract-name (generate-temporary #'name)
#:with make-name-match-transformer (generate-temporary #'name) #:with make-name-match-transformer (generate-temporary #'name)
#:with [name-for-blame ...]
(cond [(version<=? "6.8" (version)) #'[#:name-for-blame name]]
[else #'[]])
#'(begin #'(begin
(define internal-name (let ([name value]) name)) (define internal-name (let ([name value]) name))
@ -67,7 +72,7 @@
(require racket/contract/base) (require racket/contract/base)
(define-module-boundary-contract contract-name internal-name contract (define-module-boundary-contract contract-name internal-name contract
#:name-for-blame name) name-for-blame ...)
(define-match-expander name (define-match-expander name
(make-name-match-transformer (quote-syntax contract-name)) (make-name-match-transformer (quote-syntax contract-name))

Loading…
Cancel
Save