diff options
Diffstat (limited to 'testsuite/tests/rebindable/DoRestrictedM.hs')
-rw-r--r-- | testsuite/tests/rebindable/DoRestrictedM.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/tests/rebindable/DoRestrictedM.hs b/testsuite/tests/rebindable/DoRestrictedM.hs index 4f7885783e..de28079769 100644 --- a/testsuite/tests/rebindable/DoRestrictedM.hs +++ b/testsuite/tests/rebindable/DoRestrictedM.hs @@ -30,10 +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 = 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 |