Skip to content

Commit 69bff2a

Browse files
committed
sync up error message
related to racket#101
1 parent d0d1f14 commit 69bff2a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

redex-doc/redex/scribblings/ref/languages.scrbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#,pattern
3131
(code:line binding-pattern #:exports beta)
3232
(code:line binding-pattern #:refers-to beta)
33-
(code:line binding-pattern #:...bind (id beta beta))]
33+
(code:line binding-pattern #:...bind (id tail-imports-beta tail-exports-beta))]
3434
[beta nothing
3535
symbol
3636
(shadow beta-seqence ...)]

redex-lib/redex/private/binding-forms-compiler.rkt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,22 +240,24 @@
240240
,(maybe-ddd (maybe-import bspec-sub imports-beta) dotdotdoting))
241241
#`(#,@pat #,pat-sub #,@(if dotdotdoting #`((... ...)) #`())))))
242242

243+
(define (bind-must-be-followed-by)
244+
(rse "#...bind must be followed by `(id tail-imports-beta tail-exports-beta)`"))
243245

244246
(syntax-case #'rest (...) ;; is it followed by a postfix/infix operator?
245247
[(#:refers-to imports-beta (... ...) . rest-of-body)
246248
(process-under #'rest-of-body #'imports-beta #'(nothing nothing))]
247249
[(#:refers-to imports-beta #:...bind (name tail-imports tail-exports) . rest-of-body)
248250
(process-under #'rest-of-body #'imports-beta #'(name tail-imports tail-exports))]
249251
[(#:refers-to imports-beta #:...bind . anything-else)
250-
(rse "#...bind must be followed by `(name tail-imports tail-exports)`")]
252+
(bind-must-be-followed-by)]
251253
[(#:refers-to imports-beta . rest-of-body)
252254
(process-under #'rest-of-body #'imports-beta #f)]
253255
[((... ...) . rest-of-body)
254256
(process-under #'rest-of-body #f #'(nothing nothing))]
255257
[(#:...bind (name tail-imports tail-exports) . rest-of-body)
256258
(process-under #'rest-of-body #f #'(name tail-imports tail-exports))]
257-
[(#:...bind . anything-else)
258-
(rse "#...bind must be followed by `(name tail-imports tail-exports)`")]
259+
[(#:...bind . anythinge-else)
260+
(bind-must-be-followed-by)]
259261
[rest-of-body ;; no imports or ...s
260262
(process-under #'rest-of-body #f #f)]))]
261263

0 commit comments

Comments
 (0)