From 15aa3d875f2f9ebb5340822ab4cea8af4f0f39fb Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Sat, 31 Oct 2015 02:24:48 -0400 Subject: [PATCH] Delete top-level hack that's no longer necessary The trampolining implementation of the top-level solves this without the dependency on rep/type-rep.rkt --- .../typed-racket/base-env/prims-contract.rkt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/typed-racket-lib/typed-racket/base-env/prims-contract.rkt b/typed-racket-lib/typed-racket/base-env/prims-contract.rkt index bb2bae91..69ea6eca 100644 --- a/typed-racket-lib/typed-racket/base-env/prims-contract.rkt +++ b/typed-racket-lib/typed-racket/base-env/prims-contract.rkt @@ -83,11 +83,10 @@ ;; Lazily loaded b/c they're only used sometimes, so we save a lot ;; of loading by not having them when they are unneeded -(lazy-require ["../rep/type-rep.rkt" (make-Opaque Error?)] +(lazy-require ["../rep/type-rep.rkt" (Error?)] ["../types/utils.rkt" (fv)] [syntax/define (normalize-definition)] - [typed-racket/private/parse-type (parse-type)] - [typed-racket/env/type-alias-env (register-resolved-type-alias)]) + [typed-racket/private/parse-type (parse-type)]) (define (with-type* expr ty) (with-type #`(ann #,expr #,ty))) @@ -326,11 +325,6 @@ (pattern #:name-exists)) (syntax-parse stx [(_ ty:id pred:id lib (~optional ne:name-exists-kw) ...) - ;; This line appears redundant with the use of `define-type-alias` below, but - ;; it's actually necessary for top-level uses because this opaque type may appear - ;; in subsequent `require/typed` clauses, which needs to parse the types at - ;; expansion-time, not at typechecking time when aliases are installed. - (register-resolved-type-alias #'ty (make-Opaque #'pred)) (with-syntax ([hidden (generate-temporary #'pred)]) (quasisyntax/loc stx (begin