summaryrefslogtreecommitdiff
path: root/libraries/base/Text
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 /libraries/base/Text
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 'libraries/base/Text')
-rw-r--r--libraries/base/Text/ParserCombinators/ReadP.hs3
-rw-r--r--libraries/base/Text/ParserCombinators/ReadPrec.hs1
2 files changed, 0 insertions, 4 deletions
diff --git a/libraries/base/Text/ParserCombinators/ReadP.hs b/libraries/base/Text/ParserCombinators/ReadP.hs
index e28f32d53a..e6dcab55e0 100644
--- a/libraries/base/Text/ParserCombinators/ReadP.hs
+++ b/libraries/base/Text/ParserCombinators/ReadP.hs
@@ -120,8 +120,6 @@ instance Monad P where
(Result x p) >>= k = k x <|> (p >>= k)
(Final (r:|rs)) >>= k = final [ys' | (x,s) <- (r:rs), ys' <- run (k x) s]
- fail _ = Fail
-
-- | @since 4.9.0.0
instance MonadFail P where
fail _ = Fail
@@ -177,7 +175,6 @@ instance Applicative ReadP where
-- | @since 2.01
instance Monad ReadP where
- fail _ = R (\_ -> Fail)
R m >>= f = R (\k -> m (\a -> let R m' = f a in m' k))
-- | @since 4.9.0.0
diff --git a/libraries/base/Text/ParserCombinators/ReadPrec.hs b/libraries/base/Text/ParserCombinators/ReadPrec.hs
index 2b30fe08ac..df7704549a 100644
--- a/libraries/base/Text/ParserCombinators/ReadPrec.hs
+++ b/libraries/base/Text/ParserCombinators/ReadPrec.hs
@@ -85,7 +85,6 @@ instance Applicative ReadPrec where
-- | @since 2.01
instance Monad ReadPrec where
- fail s = P (\_ -> fail s)
P f >>= k = P (\n -> do a <- f n; let P f' = k a in f' n)
-- | @since 4.9.0.0