Fix for recover with -fexternal-interpreter (#15418)
authorSimon Marlow <marlowsd@gmail.com>
Wed, 26 Sep 2018 20:32:29 +0000 (15:32 -0500)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 27 Sep 2018 15:53:21 +0000 (10:53 -0500)
commitd00c308633fe7d216d31a1087e00e63532d87d6d
tree884294772ad1332e581c88c50b33622d964136c4
parent1d7b61f97f9ec3780a1b7b5bf95a880d56224f4f
Fix for recover with -fexternal-interpreter (#15418)

Summary:
When using -fexternal-interpreter, recover was not treating a Q
compuation that simply registered an error with addErrTc as failing.

Test Plan:
New unit tests:
* T15418 is the repro from in the ticket
* TH_recover_warns is a new test to ensure that we're keeping warnings when
  the body of recover succeeds.

Reviewers: bgamari, RyanGlScott, angerman, goldfire, erikd

Subscribers: rwbarton, carter

GHC Trac Issues: #15418

Differential Revision: https://phabricator.haskell.org/D5185
compiler/typecheck/TcSplice.hs
libraries/ghci/GHCi/Message.hs
libraries/ghci/GHCi/TH.hs
testsuite/tests/th/T15481.hs [new file with mode: 0644]
testsuite/tests/th/T15481.stderr [new file with mode: 0644]
testsuite/tests/th/TH_recover_warns.hs [new file with mode: 0644]
testsuite/tests/th/TH_recover_warns.stderr [new file with mode: 0644]
testsuite/tests/th/all.T