diff --git a/collects/typed-scheme/typecheck/tc-metafunctions.ss b/collects/typed-scheme/typecheck/tc-metafunctions.ss index 66f5cb61..82c62795 100644 --- a/collects/typed-scheme/typecheck/tc-metafunctions.ss +++ b/collects/typed-scheme/typecheck/tc-metafunctions.ss @@ -16,13 +16,6 @@ (p/c [name c]))) ;; this implements the sequence invariant described on the first page relating to Bot -#; -(define (lcombine l1 l2) - (cond [(memq (make-LBot) l1) - (make-LFilterSet (list (make-LBot)) null)] - [(memq (make-LBot) l2) - (make-LFilterSet null (list (make-LBot)))] - [else (make-LFilterSet l1 l2)])) (define (combine l1 l2) (match* (l1 l2) diff --git a/collects/typed-scheme/typecheck/tc-subst.ss b/collects/typed-scheme/typecheck/tc-subst.ss index f90fbffb..f6f584fc 100644 --- a/collects/typed-scheme/typecheck/tc-subst.ss +++ b/collects/typed-scheme/typecheck/tc-subst.ss @@ -17,14 +17,14 @@ (p/c [name c]))) (d/c/p (open-Result r objs) - (-> Result? (listof Object?) Result?) - (for/fold ([r r]) - ([(o k) (in-indexed (in-list objs))]) - (match r - [(Result: t fs old-obj) - (make-Result (subst-type t k o #t) - (subst-filter-set t fs o #t) - (subst-object t old-obj o #t))]))) + (-> Result? (listof Object?) (values Type/c FilterSet? Object?)) + (match r + [(Result: t fs old-obj) + (for/fold ([t t] [fs fs] [old-obj old-obj]) + ([(o k) (in-indexed (in-list objs))]) + (values (subst-type t k o #t) + (subst-filter-set fs k o #t) + (subst-object old-obj k o #t)))])) (d/c/p (subst-filter-set fs k o polarity) (-> FilterSet? integer? Object? boolean? FilterSet?)