Remove references to unstable/match from Typed Racket.

original commit: aba4def03ce532c0e077f302bc2c2fe777f3912c
This commit is contained in:
Sam Tobin-Hochstadt 2013-06-14 16:23:33 -04:00
parent c05383c66c
commit c9f69a8ba4
5 changed files with 10 additions and 12 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)