redex: syntax error fix for define-relation
please merge to the release branch
This commit is contained in:
parent
e6122d5fbd
commit
41d90c6dd5
|
@ -388,8 +388,11 @@
|
|||
(define-syntax (define-relation stx)
|
||||
(syntax-case stx ()
|
||||
[(def-form-id lang . body)
|
||||
(let-values ([(contract-name dom-ctcs codom-contracts pats)
|
||||
(split-out-contract stx (syntax-e #'def-form-id) #'body #t)])
|
||||
(begin
|
||||
(unless (identifier? #'lang)
|
||||
(raise-syntax-error #f "expected an identifier in the language position" stx #'lang))
|
||||
(define-values (contract-name dom-ctcs codom-contracts pats)
|
||||
(split-out-contract stx (syntax-e #'def-form-id) #'body #t))
|
||||
(with-syntax* ([((name trms ...) rest ...) (car pats)]
|
||||
[(mode-stx ...) #`(#:mode (name I))]
|
||||
[(ctc-stx ...) (if dom-ctcs
|
||||
|
|
|
@ -24,3 +24,7 @@
|
|||
first-where
|
||||
(where any_d any_b)
|
||||
first-post-where]))
|
||||
|
||||
(#rx"expected an identifier in the language position"
|
||||
([not-lang [(R a)]])
|
||||
(define-relation not-lang))
|
||||
|
|
Loading…
Reference in New Issue
Block a user