Omit a redundant pass.

This commit is contained in:
Vincent St-Amour 2011-07-22 16:40:11 -04:00
parent 84931448b5
commit 02b76d7741

View File

@ -232,21 +232,6 @@
(loop (cdr cases) (cdr parts)
candidates parts-acc)) ; we discard this one
;; discard subsumed cases (supertype modulo filters)
(let loop ([cases candidates]
[parts parts-acc]
;; accumulators
[candidates '()]
[parts-acc '()])
(if (not (null? cases))
(let ([head (car cases)] [tail (cdr cases)])
(if (is-subsumed-in? head tail)
(loop tail (cdr parts)
candidates parts-acc) ; we discard this one
(loop tail (cdr parts)
(cons head candidates) ; we keep this one
(cons (car parts) parts-acc))))
;; among the domains that fit with the expected type, we only
;; need to keep the most liberal
;; since we only care about permissiveness of domains, we
@ -273,7 +258,7 @@
(loop (cdr cases) (cdr parts)
(cons (car parts) parts-acc)))) ; we keep this one
(unzip4 (reverse parts-acc))))))))))
(unzip4 (reverse parts-acc))))))))
;; Wrapper over possible-domains that works on types.
(define (cleanup-type t [expected #f])