make #f always convert into the same (eq?) contract

This commit is contained in:
Robby Findler 2015-12-29 16:13:01 -06:00
parent 4bdde405f6
commit 757adac568

View File

@ -302,6 +302,7 @@
#f
(memq x the-known-good-contracts))])]
[(null? x) list/c-empty]
[(not x) false/c-contract]
[(or (symbol? x) (boolean? x) (keyword? x))
(make-eq-contract x
(if (name-default? name)
@ -477,6 +478,8 @@
((predicate-contract-pred that) this-val))))
#:list-contract? (λ (c) (null? (eq-contract-val c)))))
(define false/c-contract (make-eq-contract #f #f))
(define-struct equal-contract (val name)
#:property prop:custom-write contract-custom-write-property-proc
#:property prop:flat-contract