diff options
Diffstat (limited to 'libraries/base/Text/ParserCombinators/ReadP.hs')
-rw-r--r-- | libraries/base/Text/ParserCombinators/ReadP.hs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libraries/base/Text/ParserCombinators/ReadP.hs b/libraries/base/Text/ParserCombinators/ReadP.hs index 6c340e4597..8b84acf24e 100644 --- a/libraries/base/Text/ParserCombinators/ReadP.hs +++ b/libraries/base/Text/ParserCombinators/ReadP.hs @@ -108,9 +108,7 @@ instance Applicative P where pure x = Result x Fail (<*>) = ap -instance MonadPlus P where - mzero = empty - mplus = (<|>) +instance MonadPlus P instance Monad P where (Get f) >>= k = Get (\c -> f c >>= k) @@ -175,12 +173,10 @@ instance MonadFail ReadP where fail _ = R (\_ -> Fail) instance Alternative ReadP where - empty = mzero - (<|>) = mplus + empty = pfail + (<|>) = (+++) -instance MonadPlus ReadP where - mzero = pfail - mplus = (+++) +instance MonadPlus ReadP -- --------------------------------------------------------------------------- -- Operations over P |