diff --git a/collects/redex/private/matcher.rkt b/collects/redex/private/matcher.rkt index 1470e8719c..dc8d2e74b4 100644 --- a/collects/redex/private/matcher.rkt +++ b/collects/redex/private/matcher.rkt @@ -780,7 +780,7 @@ before the pattern compiler is invoked. [else (values (lambda (exp hole-info) - (and (eqv? pattern exp) + (and (equal? pattern exp) (list (make-mtch (make-bindings null) (build-flat-context exp) none)))) diff --git a/collects/redex/tests/matcher-test.rkt b/collects/redex/tests/matcher-test.rkt index 87049b31e7..042d74550b 100644 --- a/collects/redex/tests/matcher-test.rkt +++ b/collects/redex/tests/matcher-test.rkt @@ -31,6 +31,8 @@ (test-empty "a" '(x) #f) (test-empty "a" '() #f) (test-empty "a" "a" (list (make-test-mtch (make-bindings null) "a" none))) + (test-empty #s(x 1) #s(x 1) (list (make-test-mtch (make-bindings null) #s(x 1) none))) + (test-empty #s(x 1) #s(x 2) #f) (test-empty 'number 1 (list (make-test-mtch (make-bindings (list (make-bind 'number 1))) 1 none))) (test-empty 'number 'x #f) (test-empty 'number '() #f)