adjust the hole structs a little bit to get better printing at the REPL

This commit is contained in:
Robby Findler 2013-06-25 18:37:35 -05:00
parent 983a811c96
commit 1384d2d277

View File

@ -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?)))