Remove references to unstable/match
from Typed Racket.
original commit: aba4def03ce532c0e077f302bc2c2fe777f3912c
This commit is contained in:
parent
c05383c66c
commit
c9f69a8ba4
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user