Keep top-level names in typed TH quotes alive
authorRyan Scott <ryan.gl.scott@gmail.com>
Wed, 24 Oct 2018 11:02:59 +0000 (07:02 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Wed, 24 Oct 2018 11:02:59 +0000 (07:02 -0400)
commitbb835c96c3d962c2e08d23f6fb900665c89953b4
tree5178b9a108fe54f70c9db3ca3f14533043d2c0ff
parent79c641de60f1d6aa6f724d4fc49137ccbe3ab008
Keep top-level names in typed TH quotes alive

Summary:
When renaming untyped TH quotes, some care is taken to
ensure that uses of top-level names in quotes do not have their
bindings discarded during desugaring. The same care was not applied
to typed TH quotes, so this patch brings the two into sync.

Test Plan: make test TEST=T15783

Reviewers: bgamari, mpickering

Reviewed By: mpickering

Subscribers: mpickering, rwbarton, carter

GHC Trac Issues: #15783

Differential Revision: https://phabricator.haskell.org/D5248
compiler/typecheck/TcExpr.hs
testsuite/tests/th/T15783A.hs [new file with mode: 0644]
testsuite/tests/th/T15783B.hs [new file with mode: 0644]
testsuite/tests/th/all.T