diff --git a/typed-racket-lib/typed-racket/typecheck/tc-toplevel.rkt b/typed-racket-lib/typed-racket/typecheck/tc-toplevel.rkt index 451a065a..8bc99561 100644 --- a/typed-racket-lib/typed-racket/typecheck/tc-toplevel.rkt +++ b/typed-racket-lib/typed-racket/typecheck/tc-toplevel.rkt @@ -529,8 +529,8 @@ ;; indirection here (see the implementation in ;; provide-handling.rkt). ;; - ;; First, we generate a macro that expands to a - ;; `local-require` of the contracted identifier in the + ;; First, we generate a macro that lifts a + ;; `require` of the contracted identifier in the ;; #%contract-defs submodule: ;; (define-syntax con-f (mk-redirect f)) ;; @@ -542,7 +542,7 @@ ;; because it's important for `export-f` to be a ;; rename-transformer (making things like ;; `syntax-local-value` work right), but `con-f` can't be, - ;; since it expands to a `local-require`. + ;; since it lifts a `require` new-export-defs ... ;; Finally, we do the export: diff --git a/typed-racket-lib/typed-racket/utils/redirect-contract.rkt b/typed-racket-lib/typed-racket/utils/redirect-contract.rkt index c68ac757..9a719960 100644 --- a/typed-racket-lib/typed-racket/utils/redirect-contract.rkt +++ b/typed-racket-lib/typed-racket/utils/redirect-contract.rkt @@ -31,9 +31,9 @@ (with-syntax ([mp (collapse-module-path-index contract-defs-submod-modidx)] [i (datum->syntax id (syntax-e id) stx stx)]) - #`(let () - (local-require (only-in mp [#,(datum->syntax #'mp (syntax-e #'i)) i])) - i))] + (syntax-local-lift-require + #`(rename mp i #,(datum->syntax #'mp (syntax-e #'i))) + #'i))] [else (datum->syntax stx (cons (redirect (car (syntax-e stx)))