template-haskell: define `MonadFail Q` instance
authorHerbert Valerio Riedel <hvr@gnu.org>
Tue, 8 Mar 2016 16:26:00 +0000 (17:26 +0100)
committerHerbert Valerio Riedel <hvr@gnu.org>
Tue, 8 Mar 2016 16:26:26 +0000 (17:26 +0100)
commit1c76e1686bd4291556ae9357151f256c805b4b5d
tree2ebf12bf489a715b8b1cbb61d5d44beda1273483
parent941b8f5fa1ffbf404fde1f59a7866b937efd173a
template-haskell: define `MonadFail Q` instance

When `MonadFail`is available, this patch makes `MonadFail` a superclass
of `Quasi`, and `Q` an instance of `MonadFail`.

NB: Since f16ddcee0c64a92ab911a7841a8cf64e3ac671fd, we need to be able
    to compile `template-haskell` with stage0 compilers that don't provide
    a `MonadFail` class yet. Once we reach GHC 8.3 development we can drop
    the CPP conditionals again.

Addresses #11661

Reviewed By: bgamari, goldfire

Differential Revision: https://phabricator.haskell.org/D1982
libraries/ghci/GHCi/TH.hs
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
libraries/template-haskell/changelog.md
testsuite/tests/stranal/should_compile/T9208.hs