adjust the hole structs a little bit to get better printing at the REPL
This commit is contained in:
parent
983a811c96
commit
1384d2d277
|
@ -14,9 +14,16 @@
|
||||||
(define-struct rhs (pattern) #:transparent)
|
(define-struct rhs (pattern) #:transparent)
|
||||||
(define-values (the-hole the-not-hole hole?)
|
(define-values (the-hole the-not-hole hole?)
|
||||||
(let ()
|
(let ()
|
||||||
(define-struct hole (id)
|
(define-struct hole ()
|
||||||
#:property prop:equal+hash (list (λ (x y recur) #t) (λ (v recur) 255) (λ (v recur) 65535))
|
#:property prop:equal+hash (list (λ (x y recur) #t) (λ (v recur) 255) (λ (v recur) 65535))
|
||||||
#:inspector #f)
|
#:inspector #f)
|
||||||
(define the-hole (make-hole 'the-hole))
|
(define-struct not-hole ()
|
||||||
(define the-not-hole (make-hole 'the-not-hole))
|
#:property prop:equal+hash (list (λ (x y recur) #t) (λ (v recur) 254) (λ (v recur) 65534))
|
||||||
(values the-hole the-not-hole hole?)))
|
#: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?)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user