Make overlap for procedures and simple data stronger.

original commit: 0c187c52b70bc8a95b90b0edaaf2cb279fe3d5d5
This commit is contained in:
Eric Dobson 2014-06-26 09:27:47 -07:00
parent 0f1edd59f1
commit 714b4671e0

View File

@ -14,7 +14,10 @@
(boolean? v)
(pair? v)
(string? v)
(keyword? v)))
(keyword? v)
(char? v)
(void? v)
(eof-object? v)))
(define (overlap t1 t2)
@ -79,8 +82,8 @@
(Value: (? simple-datum? v2)))
(equal? v1 v2)]
[(or (list (Value: (? simple-datum?))
(or (? Struct?) (? StructTop?)))
(list (or (? Struct?) (? StructTop?))
(or (? Struct?) (? StructTop?) (? Function?)))
(list (or (? Struct?) (? StructTop?) (? Function?))
(Value: (? simple-datum?))))
#f]
[(list (Struct: n _ flds _ _ _)
@ -103,9 +106,6 @@
[(list (and t1 (Struct: _ _ _ _ _ _))
(and t2 (Struct: _ _ _ _ _ _)))
(or (subtype t1 t2) (subtype t2 t1))]
[(list (== (-val eof))
(Function: _))
#f]
[else #t])])))