diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2016-01-01 01:50:07 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2016-01-01 01:56:53 +0100 |
commit | b469b308351cf6120e335bf2127c13ec56b6c381 (patch) | |
tree | f1ce466ef175b74e5dbb4867197b4cdb63a9cdfd | |
parent | dafeb51f266793a67e8ae18ae39a2e2e87943824 (diff) | |
download | haskell-b469b308351cf6120e335bf2127c13ec56b6c381.tar.gz |
Minor fix of MonadFail instance for `ReadPrec`
This fixes the instance to be semantically cleaner but other than that
this fix has no practical consequences as the implementations of
`Monad(fail)` and `MonadFail(fail)` for `ReadP` coincide.
-rw-r--r-- | libraries/base/Text/ParserCombinators/ReadPrec.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/Text/ParserCombinators/ReadPrec.hs b/libraries/base/Text/ParserCombinators/ReadPrec.hs index 2a9c1d0fe8..4306c6eca4 100644 --- a/libraries/base/Text/ParserCombinators/ReadPrec.hs +++ b/libraries/base/Text/ParserCombinators/ReadPrec.hs @@ -85,7 +85,7 @@ instance Monad ReadPrec where P f >>= k = P (\n -> do a <- f n; let P f' = k a in f' n) instance MonadFail.MonadFail ReadPrec where - fail s = P (\_ -> fail s) + fail s = P (\_ -> MonadFail.fail s) instance MonadPlus ReadPrec |