typed-racket/typed-racket-test/succeed/gh-issue-181.rkt
Asumu Takikawa 241f04bcdb Fix typed provide uses in some modules
When identifiers provided by typed modules were used in
certain submodules of the form (module* n #f ...) or were
used by modules implemented in a language defined by TR,
the wrong redirection was used in the expansion.

The reason was because TR's identifier redirection decided
whether it was in a typed or untyped context at module visit
time, but that's too early in the cases above.

(because TR's #%module-begin may not have begun expanding yet)

The fix uses a rename-transformer that delays the decision
to use the typed or untyped identifier until expansion time.

Closes GH issue #163 and #181

Closes PR 15118
2015-09-08 15:53:34 -04:00

17 lines
297 B
Racket

#lang typed/racket
;; Test case for GH issue #181
(module m1 typed/racket
(provide bar)
(define-syntax-rule (bar) 42))
(module m2 typed/racket
(require typed/racket
(submod ".." m1))
(provide (all-from-out typed/racket)
bar))
(module m3 (submod ".." m2)
(bar))