From ad537cce84c9c0f16183563419512c67ad1d9ccc Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 4 May 2010 19:46:25 -0400 Subject: [PATCH] Remove unnecessary requires which caused bizarre errors --- collects/typed-scheme/private/parse-type.rkt | 25 ++++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/collects/typed-scheme/private/parse-type.rkt b/collects/typed-scheme/private/parse-type.rkt index c74e2956b2..9d6243170b 100644 --- a/collects/typed-scheme/private/parse-type.rkt +++ b/collects/typed-scheme/private/parse-type.rkt @@ -6,12 +6,12 @@ (utils tc-utils stxclass-util) syntax/stx (prefix-in c: scheme/contract) syntax/parse - (env type-environments type-name-env type-alias-env lexical-env) - (prefix-in t: (combine-in "base-types-extra.ss" "base-types.ss")) (only-in "colon.ss" :) + (env type-environments type-name-env type-alias-env lexical-env) scheme/match - (for-template scheme/base "base-types-extra.ss" "colon.ss") - (for-template (prefix-in t: "base-types-extra.ss") - (prefix-in t: (only-in "base-types.ss" Vectorof)))) + (for-template scheme/base "colon.ss") + ;; needed for tests + (combine-in (prefix-in t: "base-types-extra.ss") "colon.ss") + (for-template (prefix-in t: "base-types-extra.ss"))) (define-struct poly (name vars) #:prefab) @@ -87,8 +87,7 @@ (define-splicing-syntax-class latent-filter #:description "latent filter" - (pattern (~seq t:expr @:id pe:path-elem ...) - #:fail-unless (eq? (syntax-e #'@) '@) "expected @" + (pattern (~seq t:expr (~describe "@" (~datum @)) pe:path-elem ...) #:attr type (parse-type #'t) #:attr path (attribute pe.pe)) (pattern t:expr @@ -99,8 +98,8 @@ (parameterize ([current-orig-stx stx]) (syntax-parse stx - #:literals (t:Class t:Refinement t:Instance t:Tuple t:List cons t:pred t:-> : case-lambda - t:Vectorof t:mu t:Rec t:U t:All t:Opaque t:Parameter quote) + #:literals (t:Class t:Refinement t:Instance t:List cons t:pred t:-> : case-lambda + t:Rec t:U t:All t:Opaque t:Parameter quote) [t #:declare t (3d Type?) (attribute t.datum)] @@ -153,7 +152,7 @@ [_ (tc-error/stx ty "Component of case-lambda type was not a function clause")]))))] - [((~and kw t:Vectorof) t) + #;[((~and kw t:Vectorof) t) (add-type-name-reference #'kw) (make-Vector (parse-type #'t))] [((~and kw t:Rec) x:id t) @@ -290,11 +289,11 @@ (tc-error "Opaque: bad syntax")] [(t:U . rest) (tc-error "Union: bad syntax")] - [(t:Vectorof . rest) + #;[(t:Vectorof . rest) (tc-error "Vectorof: bad syntax")] - [((~and (~datum mu) t:mu) . rest) + [((~and (~datum mu) t:Rec) . rest) (tc-error "mu: bad syntax")] - [(t:mu . rest) + [(t:Rec . rest) (tc-error "Rec: bad syntax")] [(t ... t:-> . rest) (tc-error "->: bad syntax")]