make #f always convert into the same (eq?) contract
This commit is contained in:
parent
4bdde405f6
commit
757adac568
|
@ -302,6 +302,7 @@
|
||||||
#f
|
#f
|
||||||
(memq x the-known-good-contracts))])]
|
(memq x the-known-good-contracts))])]
|
||||||
[(null? x) list/c-empty]
|
[(null? x) list/c-empty]
|
||||||
|
[(not x) false/c-contract]
|
||||||
[(or (symbol? x) (boolean? x) (keyword? x))
|
[(or (symbol? x) (boolean? x) (keyword? x))
|
||||||
(make-eq-contract x
|
(make-eq-contract x
|
||||||
(if (name-default? name)
|
(if (name-default? name)
|
||||||
|
@ -477,6 +478,8 @@
|
||||||
((predicate-contract-pred that) this-val))))
|
((predicate-contract-pred that) this-val))))
|
||||||
#:list-contract? (λ (c) (null? (eq-contract-val c)))))
|
#:list-contract? (λ (c) (null? (eq-contract-val c)))))
|
||||||
|
|
||||||
|
(define false/c-contract (make-eq-contract #f #f))
|
||||||
|
|
||||||
(define-struct equal-contract (val name)
|
(define-struct equal-contract (val name)
|
||||||
#:property prop:custom-write contract-custom-write-property-proc
|
#:property prop:custom-write contract-custom-write-property-proc
|
||||||
#:property prop:flat-contract
|
#:property prop:flat-contract
|
||||||
|
|
Loading…
Reference in New Issue
Block a user