diff --git a/collects/redex/private/reduction-semantics.ss b/collects/redex/private/reduction-semantics.ss index b914baafc5..c082c6546d 100644 --- a/collects/redex/private/reduction-semantics.ss +++ b/collects/redex/private/reduction-semantics.ss @@ -688,7 +688,7 @@ ;; are (morally) the same as the compile-pattern-bindings (bind-withs orig-name #'#t - lang + #'lang-id2 lang-nts sides/withs/freshs 'predicate @@ -741,7 +741,7 @@ (loop (cdr mtchs) acc)]))])) other-matches))))) name - (λ (lang) (let (test-case-compile-pattern-bindings ...) `lhs-w/extras)) + (λ (lang-id2) (let (test-case-compile-pattern-bindings ...) `lhs-w/extras)) lhs-source case-id))))))) diff --git a/collects/redex/private/tl-test.ss b/collects/redex/private/tl-test.ss index bda6a715f0..e6c82aa862 100644 --- a/collects/redex/private/tl-test.ss +++ b/collects/redex/private/tl-test.ss @@ -1203,6 +1203,17 @@ '(x y z)) (list '(x1 y1 z1 x y z))) + ;; test that redex match can be used in a side-condition + ;; with the same language that is used to define the + ;; reduction relation. + (test (apply-reduction-relation + (reduction-relation + empty-language + (--> any_1 3 + (side-condition (redex-match empty-language (any_1 any_2) (term any_1))))) + '(a b)) + '(3)) + (test (apply-reduction-relation (reduction-relation empty-language