From 28ff44d0f2003871014426780d82ec9e41f141fd Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Mon, 24 May 2010 14:22:23 -0400 Subject: [PATCH] Add subtyping for dotted lists with the same bound. original commit: 62fb6f93110e9ed23ed0b979af5b3c1608f088e7 --- collects/typed-scheme/types/subtype.rkt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/collects/typed-scheme/types/subtype.rkt b/collects/typed-scheme/types/subtype.rkt index d03769bb..36c939c1 100644 --- a/collects/typed-scheme/types/subtype.rkt +++ b/collects/typed-scheme/types/subtype.rkt @@ -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)