diff --git a/collects/redex/private/matcher.rkt b/collects/redex/private/matcher.rkt index 6d88b7df7f..3bbe9eb335 100644 --- a/collects/redex/private/matcher.rkt +++ b/collects/redex/private/matcher.rkt @@ -1449,7 +1449,7 @@ before the pattern compiler is invoked. [`(variable-prefix ,vars) ribs] [`variable-not-otherwise-mentioned ribs] - [`hole (error 'match-pattern "cannot have a hole inside an ellipses")] + [`hole ribs] [(? symbol?) (cond [(regexp-match #rx"_!_" (symbol->string pattern)) diff --git a/collects/redex/tests/matcher-test.rkt b/collects/redex/tests/matcher-test.rkt index b03703c25d..3e4eeac33f 100644 --- a/collects/redex/tests/matcher-test.rkt +++ b/collects/redex/tests/matcher-test.rkt @@ -185,6 +185,7 @@ (test-empty '((name x a) ...) '() (list (make-test-mtch (make-bindings (list (make-bind 'x '()))) '() none))) (test-empty '((name x a) ...) '(a) (list (make-test-mtch (make-bindings (list (make-bind 'x '(a)))) '(a) none))) (test-empty '((name x a) ...) '(a a) (list (make-test-mtch (make-bindings (list (make-bind 'x '(a a)))) '(a a) none))) + (test-empty '(hole ...) '() (list (make-test-mtch (make-bindings empty) '() none))) (test-empty '(b ... a ...) '() (list (make-test-mtch (make-bindings empty) '() none))) (test-empty '(b ... a ...) '(a) (list (make-test-mtch (make-bindings empty) '(a) none)))