Add subtyping for dotted lists with the same bound.

original commit: 62fb6f93110e9ed23ed0b979af5b3c1608f088e7
This commit is contained in:
Stevie Strickland 2010-05-24 14:22:23 -04:00 committed by Sam Tobin-Hochstadt
parent 54a57ab177
commit 28ff44d0f2

View File

@ -295,6 +295,9 @@
[((Pair: a d) (Pair: a* d*))
(let ([A1 (subtype* A0 a a*)])
(and A1 (subtype* A1 d d*)))]
;; recur structurally on dotted lists, assuming same bounds
[((ListDots: s-dty dbound) (ListDots: t-dty dbound))
(subtype* A0 s-dty t-dty)]
;; quantification over two types preserves subtyping
[((Poly: ns b1) (Poly: ms b2))
(=> unmatch)