diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2018-11-10 01:12:52 +0100 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2019-04-05 13:20:02 -0400 |
commit | 86ce5718b18a31d85c8321a6c37b0b150e8f3c29 (patch) | |
tree | 6568709d9a061b30d8b7767e1ba5e9d30cdcf5e1 /testsuite/tests/rebindable/DoRestrictedM.hs | |
parent | 3ab1b78681351d46a0df33e2f5e45ad0d1d5c92f (diff) | |
download | haskell-86ce5718b18a31d85c8321a6c37b0b150e8f3c29.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.hs | 6 |
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 |