Error eagerly after renaming failures in reifyInstances
authorRyan Scott <ryan.gl.scott@gmail.com>
Fri, 28 Jul 2017 15:35:22 +0000 (11:35 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Fri, 28 Jul 2017 15:35:22 +0000 (11:35 -0400)
commitd6186496d414638aa66a677bb4e555dba376ec97
tree31359c43ad67fbc57dec45f73cf89009f2babb7a
parentad0037ea3ea0eb9e2e693fa10f2171611c4e2217
Error eagerly after renaming failures in reifyInstances

Summary:
Previously, if `reifyInstances` failed to discover a `Name` during
renaming, it would blindy charge into typechecking, at which point GHC would
become very confused at the absence of that `Name` and throw an internal error.
A simple workaround is to fail eagerly after renaming errors.

Test Plan: make test TEST=T13837

Reviewers: goldfire, austin, bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rwbarton, thomie

GHC Trac Issues: #13837

Differential Revision: https://phabricator.haskell.org/D3793
compiler/typecheck/TcSplice.hs
testsuite/tests/th/T13837.hs [new file with mode: 0644]
testsuite/tests/th/T13837.stderr [new file with mode: 0644]
testsuite/tests/th/all.T