summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T8331.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2018-11-10 01:12:52 +0100
committerBen Gamari <ben@smart-cactus.org>2019-03-22 10:34:51 -0400
commitab51bee40c82cd552bcf13e24b67d43f3b8d25f3 (patch)
treea75a4102576dad50af44e342fb9152e7270792eb /testsuite/tests/simplCore/should_compile/T8331.hs
parentcd07086ada34888c08585f4dc98a961618748ed0 (diff)
downloadhaskell-ab51bee40c82cd552bcf13e24b67d43f3b8d25f3.tar.gz
base: Remove `Monad(fail)` method and reexport `MonadFail(fail)` instead
As per https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail Coauthored-by: Ben Gamari <ben@well-typed.com>
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T8331.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/T8331.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T8331.hs b/testsuite/tests/simplCore/should_compile/T8331.hs
index 04cb1aff73..a7dc318826 100644
--- a/testsuite/tests/simplCore/should_compile/T8331.hs
+++ b/testsuite/tests/simplCore/should_compile/T8331.hs
@@ -23,6 +23,8 @@ instance (Monad m) => Monad (ReaderT r m) where
m >>= k = ReaderT $ \ r -> do
a <- runReaderT m r
runReaderT (k a) r
+
+instance MonadFail m => MonadFail (ReaderT r m) where
fail msg = ReaderT (\_ -> fail msg)
mapReaderT :: (m a -> n b) -> ReaderT r m a -> ReaderT r n b