diff --git a/collects/typed-racket/core.rkt b/collects/typed-racket/core.rkt index 17360fab..1fdfbb64 100644 --- a/collects/typed-racket/core.rkt +++ b/collects/typed-racket/core.rkt @@ -5,7 +5,7 @@ (for-template racket/base) (private with-types type-contract parse-type syntax-properties) (except-in syntax/parse id) - racket/match racket/syntax unstable/match racket/list syntax/stx + racket/match racket/syntax racket/list syntax/stx racket/format racket/promise (only-in racket/string string-join) diff --git a/collects/typed-racket/optimizer/utils.rkt b/collects/typed-racket/optimizer/utils.rkt index 09e81d3c..f3a1a2be 100644 --- a/collects/typed-racket/optimizer/utils.rkt +++ b/collects/typed-racket/optimizer/utils.rkt @@ -1,6 +1,6 @@ #lang racket/base -(require unstable/match racket/match unstable/sequence unstable/syntax +(require racket/match unstable/sequence unstable/syntax racket/dict syntax/id-table racket/syntax syntax/stx "../utils/utils.rkt" (for-template racket/base) diff --git a/collects/typed-racket/private/type-contract.rkt b/collects/typed-racket/private/type-contract.rkt index 02261ec0..ef45f34e 100644 --- a/collects/typed-racket/private/type-contract.rkt +++ b/collects/typed-racket/private/type-contract.rkt @@ -14,7 +14,7 @@ (types resolve utils) (prefix-in t: (types abbrev numeric-tower)) (private parse-type syntax-properties) - racket/match unstable/match syntax/struct syntax/stx racket/syntax racket/list + racket/match syntax/struct syntax/stx racket/syntax racket/list unstable/sequence (contract-req) (for-template racket/base racket/contract racket/set (utils any-wrap) diff --git a/collects/typed-racket/types/subtype.rkt b/collects/typed-racket/types/subtype.rkt index 60aadd88..32c9cfb9 100644 --- a/collects/typed-racket/types/subtype.rkt +++ b/collects/typed-racket/types/subtype.rkt @@ -1,6 +1,6 @@ #lang racket/base (require (except-in "../utils/utils.rkt" infer) - racket/match unstable/match racket/function racket/lazy-require racket/list + racket/match racket/function racket/lazy-require racket/list (prefix-in c: (contract-req)) (rep type-rep filter-rep object-rep rep-utils) (utils tc-utils) diff --git a/collects/typed-racket/types/union.rkt b/collects/typed-racket/types/union.rkt index 120c5ae4..f17b81c5 100644 --- a/collects/typed-racket/types/union.rkt +++ b/collects/typed-racket/types/union.rkt @@ -5,8 +5,7 @@ (prefix-in c: (contract-req)) (types subtype base-abbrev resolve) racket/match - racket/list - (only-in unstable/match match*?)) + racket/list) (provide/cond-contract @@ -24,19 +23,18 @@ ;; The output is a non overlapping list of non Union types. (define (merge a b) (define b* (make-union* b)) - (cond + (match* (a b) ;; If a union element is a Name application, then it should not ;; be checked for subtyping since that can cause infinite ;; loops if this is called during type instantiation. - [(match*? (a b) ((App: (? Name?) _ _) b)) - (match-define (App: rator rands stx) a) + [((App: (and (Name: _) rator) rands stx) _) ;; However, we should check if it's a well-formed application ;; so that bad applications are rejected early. (resolve-app-check-error rator rands stx) (cons a b)] - [(subtype a b*) b] - [(subtype b* a) (list a)] - [else (cons a b)])) + [((? (λ _ (subtype a b*))) _) b] + [((? (λ _ (subtype b* a))) _) (list a)] + [(_ _) (cons a b)])) ;; Type -> List[Type] (define (flat t)