diff --git a/pkgs/redex/private/lang-struct.rkt b/pkgs/redex/private/lang-struct.rkt index e29eb6f255..9a4605df18 100644 --- a/pkgs/redex/private/lang-struct.rkt +++ b/pkgs/redex/private/lang-struct.rkt @@ -14,9 +14,16 @@ (define-struct rhs (pattern) #:transparent) (define-values (the-hole the-not-hole hole?) (let () - (define-struct hole (id) + (define-struct hole () #:property prop:equal+hash (list (λ (x y recur) #t) (λ (v recur) 255) (λ (v recur) 65535)) #:inspector #f) - (define the-hole (make-hole 'the-hole)) - (define the-not-hole (make-hole 'the-not-hole)) - (values the-hole the-not-hole hole?))) + (define-struct not-hole () + #:property prop:equal+hash (list (λ (x y recur) #t) (λ (v recur) 254) (λ (v recur) 65534)) + #:inspector #f) + (define the-hole (make-hole)) + (define the-not-hole (make-not-hole)) + (define -hole? + (let ([hole? + (λ (x) (or (hole? x) (not-hole? x)))]) + hole?)) + (values the-hole the-not-hole -hole?)))