diff options
| -rw-r--r-- | libraries/base/Control/Monad/Fail.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/base/Control/Monad/Fail.hs b/libraries/base/Control/Monad/Fail.hs index 3d7da77134..fcc6d1920b 100644 --- a/libraries/base/Control/Monad/Fail.hs +++ b/libraries/base/Control/Monad/Fail.hs @@ -61,6 +61,10 @@ import GHC.Base (String, Monad(), Maybe(Nothing), IO(), failIO) -- fail _ = mzero -- @ -- +-- @fail s@ should be an action that runs in the monad itself, not an +-- exception (except in instances of @MonadIO@). In particular, +-- @fail@ should not be implemented in terms of @error@. +-- -- @since 4.9.0.0 class Monad m => MonadFail m where fail :: String -> m a |
