File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 1132
1132
(define mode (syntax->datum #'_mode ))
1133
1133
(cond
1134
1134
[(number? mode)
1135
- #'(λ (_ )
1136
- (error 'syn-err-name
1137
- "judgment forms no mode cannot be used in term " ))]
1135
+ (raise-syntax-error
1136
+ (syntax-e #'syn-err-name )
1137
+ "modeless judgment forms cannot be used in term "
1138
+ #'jdg-name )]
1138
1139
[(and mode (member 'O mode))
1139
1140
#'(λ (_ )
1140
1141
(error 'syn-err-name
Original file line number Diff line number Diff line change 24
24
(rename-in racket/match (match match:)))
25
25
26
26
(require (for-syntax syntax/name
27
+ syntax/stx
27
28
"keyword-macros.rkt "
28
29
"cycle-check.rkt "
29
30
"loc-wrapper-ct.rkt "
1735
1736
[_
1736
1737
(set)]))
1737
1738
1738
- (define-for-syntax (check-arity-consistency mode contracts full-def)
1739
- (when (and contracts (not (= (length mode) (length contracts))))
1740
- (raise-syntax-error
1741
- #f "mode and contract specify different numbers of positions " full-def)))
1742
-
1743
1739
(define-for-syntax (defined-name declared-names clauses orig-stx)
1744
1740
(with-syntax ([(((used-names _ ... ) _ ... ) ... ) clauses])
1745
1741
(define-values (the-name other-names)
3085
3081
#'jf ))
3086
3082
(define a-judgment-form (syntax-local-value #'jf ))
3087
3083
(define mode (judgment-form-mode a-judgment-form))
3084
+ (when (number? mode)
3085
+ (raise-syntax-error 'test-judgment-holds
3086
+ (string-append
3087
+ "modeless judgment forms should supply only the their name "
3088
+ " as the first argument " )
3089
+ stx
3090
+ (stx-car (stx-cdr stx))))
3088
3091
(define orig-jf-stx (list-ref (syntax->list stx) 1 ))
3089
3092
(define jf-list (syntax->list #'(jf . rest)))
3090
3093
(cond
You can’t perform that action at this time.
0 commit comments