diff --git a/collects/redex/private/reduction-semantics.ss b/collects/redex/private/reduction-semantics.ss index 7fb622f09a..8598fdc5f6 100644 --- a/collects/redex/private/reduction-semantics.ss +++ b/collects/redex/private/reduction-semantics.ss @@ -706,8 +706,8 @@ #` (let ([case-id (gensym)]) (make-rewrite-proc - (λ (lang) - (let ([cp (compile-pattern lang `side-conditions-rewritten #t)] + (λ (lang-id) + (let ([cp (compile-pattern lang-id `side-conditions-rewritten #t)] compile-pattern-bindings ...) (λ (main-exp exp f other-matches) (let ([mtchs (match-pattern cp exp)]) diff --git a/collects/redex/private/tl-test.ss b/collects/redex/private/tl-test.ss index e52093a7f8..dbbed4658e 100644 --- a/collects/redex/private/tl-test.ss +++ b/collects/redex/private/tl-test.ss @@ -1000,6 +1000,14 @@ (:-> 1 2)) 1) '(2)) + + (let () + (define-language n-lang + [n number]) + (test (apply-reduction-relation + (reduction-relation n-lang [--> any ,(length (redex-match n-lang n 1))]) + 11) + '(1))) (parameterize ([current-namespace syn-err-test-namespace]) (eval (quote-syntax