fail -package:relude -package:hedgehog
base Prelude Control.Monad Control.Monad.Fail,
ghc GHC.Prelude.Basic,
base-compat Control.Monad.Compat Control.Monad.Compat Prelude.Compat,
fail Control.Monad.Fail,
rio RIO.Prelude,
base-prelude BasePrelude,
numeric-prelude NumericPrelude NumericPrelude.Base,
universum Universum.Monad.Reexport,
base-compat-batteries Control.Monad.Compat,
fused-effects Control.Effect.Fail,
Cabal-syntax Distribution.Compat.MonadFail Distribution.Compat.Prelude,
github GitHub.Internal.Prelude,
numhask NumHask.Prelude,
ghc-lib-parser GHC.Prelude.Basic,
dimensional Numeric.Units.Dimensional.Prelude,
rebase Rebase.Prelude,
hledger Hledger.Cli.Script,
mixed-types-num Numeric.MixedTypes.PreludeHiding,
xmonad-contrib XMonad.Config.Prime,
stack Stack.Prelude,
linear-base Control.Functor.Linear,
massiv-test Test.Massiv.Utils,
incipit-base Incipit.Base,
LambdaHack Game.LambdaHack.Core.Prelude Game.LambdaHack.Core.Prelude,
cabal-install-solver Distribution.Solver.Compat.Prelude,
can-i-haz Control.Monad.Except.CoHas Control.Monad.Reader.Has,
yesod-paginator Yesod.Paginator.Prelude,
faktory Faktory.Prelude,
hledger-web Hledger.Web.Import,
zio ZIO.Trans Important note
This
ignores whatever
String you give it. It is a bad
idea to use
fail as a form of labelled error; instead, it
should only be defaulted to when a pattern match fails.
Fail with a message. This operation is not part of the mathematical
definition of a monad, but is invoked on pattern-match failure in a
do expression.
As part of the MonadFail proposal (MFP), this function is moved to its
own class
MonadFail (see
Control.Monad.Fail for more
details). The definition here will be removed in a future release.
Fail with the provided error message.
Lift an
IOError to the answer type, similar to
fail.
This
fail function aims to be used as the last statement of a
do block.
Constructs a validator that always fails with provided error
e.
Example
>>> validateP ( fail "YOU SHALL NOT PASS!!!" ) 1
Right "YOU SHALL NOT PASS!!!"
Transitional module providing the
MonadFail class and primitive
instances.
This module can be imported for defining forward compatible
MonadFail instances:
import qualified Control.Monad.Fail as Fail
instance Monad Foo where
(>>=) = {- ...bind impl... -}
-- Provide legacy fail implementation for when
-- new-style MonadFail desugaring is not enabled.
fail = Fail.fail
instance Fail.MonadFail Foo where
fail = {- ...fail implementation... -}
See
https://gitlab.haskell.org/haskell/prime/-/wikis/libraries/proposals/monad-fail
for more details.
The decoder ran into an error. The decoder either used
fail or
was not provided enough input. Contains any unconsumed input and the
number of bytes consumed.
The decoder ran into an error. The decoder either used
fail or
was not provided enough input.
The parse failed. The
i parameter is the input that had not
yet been consumed when the failure occurred. The
[String] is a list of contexts in which the
error occurred. The
String is the message describing the error,
if any.
The parse failed. The
ByteString is the input that had not yet
been consumed when the failure occurred. The
[String] is a list of contexts in which the
error occurred. The
String is the message describing the error,
if any.
The parse failed. The
Text is the input that had not yet been
consumed when the failure occurred. The
[String] is a list of contexts in which the
error occurred. The
String is the message describing the error,
if any.
The parse failed. The
String is the message describing the
error, if any.
Occurs when flattening a line. The layouter will reject this document,
choosing a more suitable rendering.
Keep trying other paths. The ServantError should only be 404,
405 or 406.
Transitional module providing the
MonadFail class and primitive
instances.
This module can be imported for defining forward compatible
MonadFail instances:
import qualified Control.Monad.Fail as Fail
instance Monad Foo where
(>>=) = {- ...bind impl... -}
-- Provide legacy fail implementation for when
-- new-style MonadFail desugaring is not enabled.
fail = Fail.fail
instance Fail.MonadFail Foo where
fail = {- ...fail implementation... -}
See
https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail
for more details.
The input data was malformed. The first field contains any unconsumed
input and second field contains information about the parse error.
This effect abstracts the concept of
MonadFail, which is a
built-in mechanism that converts pattern matching errors to calls to
the current monad's instance of that class.
The instance defined in
Polysemy.Internal uses this effect to
catch those errors.