summaryrefslogtreecommitdiff
path: root/testsuite/tests/rebindable/DoRestrictedM.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/rebindable/DoRestrictedM.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/rebindable/DoRestrictedM.hs')
-rw-r--r--testsuite/tests/rebindable/DoRestrictedM.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/rebindable/DoRestrictedM.hs b/testsuite/tests/rebindable/DoRestrictedM.hs
index 2e982c1532..de28079769 100644
--- a/testsuite/tests/rebindable/DoRestrictedM.hs
+++ b/testsuite/tests/rebindable/DoRestrictedM.hs
@@ -30,11 +30,11 @@ m1 >> m2 = m1 >>= (const m2)
newtype RegularM m a = RegularM{unRM :: m a}
-instance Prelude.Monad m => MN2 (RegularM m) a where
+instance Prelude.MonadFail m => MN2 (RegularM m) a where
return = RegularM . Prelude.return
- fail = RegularM . Prelude.fail
+ fail = fail
-instance Prelude.Monad m => MN3 (RegularM m) a b where
+instance Prelude.MonadFail m => MN3 (RegularM m) a b where
m >>= f = RegularM ((Prelude.>>=) (unRM m) (unRM . f))
-- We try to inject Maybe (as the regular monad) into Restricted Monad