gitit-0.16: Wiki using happstack, git or darcs, and pandoc.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Network.Gitit.Compat.Except

Synopsis

- data ExceptT e (m :: Type -> Type) a
- type Except e = ExceptT e Identity
- class Error a where
  - noMsg :: a
  - strMsg :: String -> a
- runExceptT :: ExceptT e m a -> m (Either e a)
- runExcept :: Except e a -> Either e a
- class Monad m => MonadError e (m :: Type -> Type) | m -> e
- throwError :: MonadError e m => e -> m a
- catchError :: MonadError e m => m a -> (e -> m a) -> m a

# Documentation

data ExceptT e (m :: Type -> Type) a Source #

A monad transformer that adds exceptions to other monads.

`ExceptT` constructs a monad parameterized over two things:

- e - The exception type.
- m - The inner monad.

The `return` function yields a computation that produces the given value, while `>>=` sequences two subcomputations, exiting on the first exception.

#### Instances

Instances details

MonadRWS r w s m => MonadRWS r w s (ExceptT e m) | Since: mtl-2.2
Instance details Defined in Control.Monad.RWS.Class
Functor m => Generic1 (ExceptT e m :: Type -> Type) |

Instance details

Defined in Control.Monad.Trans.Except

Associated Types

type Rep1 (ExceptT e m :: Type -> Type) |
Instance details Defined in Control.Monad.Trans.Except type Rep1 (ExceptT e m :: Type -> Type) = D1 ('MetaData "ExceptT" "Control.Monad.Trans.Except" "transformers-0.6.1.1-inplace" 'True) (C1 ('MetaCons "ExceptT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (m :.: Rec1 (Either e))))

Methods

from1 :: ExceptT e m a -> Rep1 (ExceptT e m) a Source #

to1 :: Rep1 (ExceptT e m) a -> ExceptT e m a Source #

FilterMonad a m => FilterMonad a (ExceptT e m) |
Instance details Defined in Happstack.Server.Internal.Monads Methods setFilter :: (a -> a) -> ExceptT e m () Source # composeFilter :: (a -> a) -> ExceptT e m () Source # getFilter :: ExceptT e m b -> ExceptT e m (b, a -> a) Source #
WebMonad a m => WebMonad a (ExceptT e m) |
Instance details Defined in Happstack.Server.Internal.Monads Methods finishWith :: a -> ExceptT e m b Source #
MonadBaseControl b m => MonadBaseControl b (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Control Methods liftBaseWith :: (RunInBase (ExceptT e m) b -> b a) -> ExceptT e m a restoreM :: StM (ExceptT e m) a -> ExceptT e m a
MonadAccum w m => MonadAccum w (ExceptT e m) | The accumulated value 'survives' an exception: even if the computation fails to deliver a result, we still have an accumulated value. Since: mtl-2.3
Instance details Defined in Control.Monad.Accum Methods look :: ExceptT e m w Source # add :: w -> ExceptT e m () Source # accum :: (w -> (a, w)) -> ExceptT e m a Source #
Monad m => MonadError e (ExceptT e m) | Since: mtl-2.2
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> ExceptT e m a Source # catchError :: ExceptT e m a -> (e -> ExceptT e m a) -> ExceptT e m a Source #
MonadReader r m => MonadReader r (ExceptT e m) | Since: mtl-2.2
Instance details Defined in Control.Monad.Reader.Class Methods ask :: ExceptT e m r Source # local :: (r -> r) -> ExceptT e m a -> ExceptT e m a Source # reader :: (r -> a) -> ExceptT e m a Source #
MonadSelect r m => MonadSelect r (ExceptT e m) | 'Extends' the possibilities considered by `m` to include every value of `e`; this means that the potential result could be either a `Left` (making it a choice of type `e`) or a `Right` (making it a choice of type `a`). Since: mtl-2.3
Instance details Defined in Control.Monad.Select Methods select :: ((a -> r) -> a) -> ExceptT e m a Source #
MonadState s m => MonadState s (ExceptT e m) | Since: mtl-2.2
Instance details Defined in Control.Monad.State.Class Methods get :: ExceptT e m s Source # put :: s -> ExceptT e m () Source # state :: (s -> (a, s)) -> ExceptT e m a Source #
MonadWriter w m => MonadWriter w (ExceptT e m) | Since: mtl-2.2
Instance details Defined in Control.Monad.Writer.Class Methods writer :: (a, w) -> ExceptT e m a Source # tell :: w -> ExceptT e m () Source # listen :: ExceptT e m a -> ExceptT e m (a, w) Source # pass :: ExceptT e m (a, w -> w) -> ExceptT e m a Source #
MonadTransControl (ExceptT e) |
Instance details Defined in Control.Monad.Trans.Control Methods liftWith :: Monad m => (Run (ExceptT e) -> m a) -> ExceptT e m a restoreT :: Monad m => m (StT (ExceptT e) a) -> ExceptT e m a
MonadTrans (ExceptT e) |
Instance details Defined in Control.Monad.Trans.Except Methods lift :: Monad m => m a -> ExceptT e m a Source #
MonadIO m => MonadIO (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods liftIO :: IO a -> ExceptT e m a Source #
MonadZip m => MonadZip (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods mzip :: ExceptT e m a -> ExceptT e m b -> ExceptT e m (a, b) Source # mzipWith :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c Source # munzip :: ExceptT e m (a, b) -> (ExceptT e m a, ExceptT e m b) Source #
(Eq e, Eq1 m) => Eq1 (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods liftEq :: (a -> b -> Bool) -> ExceptT e m a -> ExceptT e m b -> Bool Source #
(Ord e, Ord1 m) => Ord1 (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods liftCompare :: (a -> b -> Ordering) -> ExceptT e m a -> ExceptT e m b -> Ordering Source #
(Read e, Read1 m) => Read1 (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (ExceptT e m a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [ExceptT e m a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (ExceptT e m a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ExceptT e m a] Source #
(Show e, Show1 m) => Show1 (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> ExceptT e m a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [ExceptT e m a] -> ShowS Source #
Contravariant m => Contravariant (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods contramap :: (a' -> a) -> ExceptT e m a -> ExceptT e m a' Source # (>$) :: b -> ExceptT e m b -> ExceptT e m a Source #
MonadCatch m => MonadCatch (ExceptT e m) | Catches exceptions from the base monad.
Instance details Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e0) => ExceptT e m a -> (e0 -> ExceptT e m a) -> ExceptT e m a Source #
MonadMask m => MonadMask (ExceptT e m) | Since: exceptions-0.9.0

Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. ExceptT e m a -> ExceptT e m a) -> ExceptT e m b) -> ExceptT e m b Source #

uninterruptibleMask :: HasCallStack => ((forall a. ExceptT e m a -> ExceptT e m a) -> ExceptT e m b) -> ExceptT e m b Source #

generalBracket :: HasCallStack => ExceptT e m a -> (a -> ExitCase b -> ExceptT e m c) -> (a -> ExceptT e m b) -> ExceptT e m (b, c) Source #

MonadThrow m => MonadThrow (ExceptT e m) | Throws exceptions into the base monad.
Instance details Defined in Control.Monad.Catch Methods throwM :: (HasCallStack, Exception e0) => e0 -> ExceptT e m a Source #
(Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) |
Instance details Defined in GHC.Driver.DynFlags Methods getDynFlags :: ExceptT e m DynFlags Source #
(Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods empty :: ExceptT e m a Source # (<|>) :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source # some :: ExceptT e m a -> ExceptT e m [a] Source # many :: ExceptT e m a -> ExceptT e m [a] Source #
(Functor m, Monad m) => Applicative (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods pure :: a -> ExceptT e m a Source # (<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b Source # liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c Source # (*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b Source # (<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a Source #
Functor m => Functor (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b Source # (<$) :: a -> ExceptT e m b -> ExceptT e m a Source #
Monad m => Monad (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods (>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b Source # (>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b Source # return :: a -> ExceptT e m a Source #
(Monad m, Monoid e) => MonadPlus (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods mzero :: ExceptT e m a Source # mplus :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #
MonadFail m => MonadFail (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods fail :: String -> ExceptT e m a Source #
MonadFix m => MonadFix (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Except Methods mfix :: (a -> ExceptT e m a) -> ExceptT e m a Source #
Foldable f => Foldable (ExceptT e f) |

Instance details

Defined in Control.Monad.Trans.Except

Methods

fold :: Monoid m => ExceptT e f m -> m Source #

foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m Source #

foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b Source #

foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b Source #

foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b Source #

foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b Source #

foldr1 :: (a -> a -> a) -> ExceptT e f a -> a Source #

foldl1 :: (a -> a -> a) -> ExceptT e f a -> a Source #

toList :: ExceptT e f a -> [a] Source #

null :: ExceptT e f a -> Bool Source #

length :: ExceptT e f a -> Int Source #

elem :: Eq a => a -> ExceptT e f a -> Bool Source #

maximum :: Ord a => ExceptT e f a -> a Source #

minimum :: Ord a => ExceptT e f a -> a Source #

sum :: Num a => ExceptT e f a -> a Source #

product :: Num a => ExceptT e f a -> a Source #

Traversable f => Traversable (ExceptT e f) |
Instance details Defined in Control.Monad.Trans.Except Methods traverse :: Applicative f0 => (a -> f0 b) -> ExceptT e f a -> f0 (ExceptT e f b) Source # sequenceA :: Applicative f0 => ExceptT e f (f0 a) -> f0 (ExceptT e f a) Source # mapM :: Monad m => (a -> m b) -> ExceptT e f a -> m (ExceptT e f b) Source # sequence :: Monad m => ExceptT e f (m a) -> m (ExceptT e f a) Source #
ServerMonad m => ServerMonad (ExceptT e m) |
Instance details Defined in Happstack.Server.Internal.Monads Methods askRq :: ExceptT e m Request Source # localRq :: (Request -> Request) -> ExceptT e m a -> ExceptT e m a Source #
(Happstack m, Monoid e) => Happstack (ExceptT e m) |
Instance details Defined in Happstack.Server.Monads
(Monad m, HasRqData m) => HasRqData (ExceptT e m) |
Instance details Defined in Happstack.Server.RqData Methods askRqEnv :: ExceptT e m RqEnv Source # localRqEnv :: (RqEnv -> RqEnv) -> ExceptT e m a -> ExceptT e m a Source # rqDataError :: Errors String -> ExceptT e m a Source #
MonadCont m => MonadCont (ExceptT e m) | Since: mtl-2.2
Instance details Defined in Control.Monad.Cont.Class Methods callCC :: ((a -> ExceptT e m b) -> ExceptT e m a) -> ExceptT e m a Source #
PrimMonad m => PrimMonad (ExceptT e m) |

Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ExceptT e m) |
Instance details Defined in Control.Monad.Primitive type PrimState (ExceptT e m) = PrimState m

Methods

primitive :: (State# (PrimState (ExceptT e m)) -> (# State# (PrimState (ExceptT e m)), a #)) -> ExceptT e m a

MonadResource m => MonadResource (ExceptT e m) |
Instance details Defined in Control.Monad.Trans.Resource.Internal Methods liftResourceT :: ResourceT IO a -> ExceptT e m a
Generic (ExceptT e m a) |

Instance details

Defined in Control.Monad.Trans.Except

Associated Types

type Rep (ExceptT e m a) |
Instance details Defined in Control.Monad.Trans.Except type Rep (ExceptT e m a) = D1 ('MetaData "ExceptT" "Control.Monad.Trans.Except" "transformers-0.6.1.1-inplace" 'True) (C1 ('MetaCons "ExceptT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (Either e a)))))

Methods

from :: ExceptT e m a -> Rep (ExceptT e m a) x Source #

to :: Rep (ExceptT e m a) x -> ExceptT e m a Source #

(Read e, Read1 m, Read a) => Read (ExceptT e m a) |
Instance details Defined in Control.Monad.Trans.Except Methods readsPrec :: Int -> ReadS (ExceptT e m a) Source # readList :: ReadS [ExceptT e m a] Source # readPrec :: ReadPrec (ExceptT e m a) Source # readListPrec :: ReadPrec [ExceptT e m a] Source #
(Show e, Show1 m, Show a) => Show (ExceptT e m a) |
Instance details Defined in Control.Monad.Trans.Except Methods showsPrec :: Int -> ExceptT e m a -> ShowS Source # show :: ExceptT e m a -> String Source # showList :: [ExceptT e m a] -> ShowS Source #
(Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) |
Instance details Defined in Control.Monad.Trans.Except Methods (==) :: ExceptT e m a -> ExceptT e m a -> Bool Source # (/=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #
(Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) |

Instance details

Defined in Control.Monad.Trans.Except

Methods

compare :: ExceptT e m a -> ExceptT e m a -> Ordering Source #

(<) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(<=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(>) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(>=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

max :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

min :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

type Rep1 (ExceptT e m :: Type -> Type) |
Instance details Defined in Control.Monad.Trans.Except type Rep1 (ExceptT e m :: Type -> Type) = D1 ('MetaData "ExceptT" "Control.Monad.Trans.Except" "transformers-0.6.1.1-inplace" 'True) (C1 ('MetaCons "ExceptT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (m :.: Rec1 (Either e))))
type StT (ExceptT e) a |
Instance details Defined in Control.Monad.Trans.Control type StT (ExceptT e) a = Either e a
type PrimState (ExceptT e m) |
Instance details Defined in Control.Monad.Primitive type PrimState (ExceptT e m) = PrimState m
type StM (ExceptT e m) a |
Instance details Defined in Control.Monad.Trans.Control type StM (ExceptT e m) a = ComposeSt (ExceptT e) m a
type Rep (ExceptT e m a) |
Instance details Defined in Control.Monad.Trans.Except type Rep (ExceptT e m a) = D1 ('MetaData "ExceptT" "Control.Monad.Trans.Except" "transformers-0.6.1.1-inplace" 'True) (C1 ('MetaCons "ExceptT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (Either e a)))))

type Except e = ExceptT e Identity Source #

The parameterizable exception monad.

Computations are either exceptions or normal values.

The `return` function returns a normal value, while `>>=` exits on the first exception. For a variant that continues after an error and collects all the errors, see `Errors`.

class Error a where Source #

Minimal complete definition

Nothing

Methods

noMsg :: a Source #

strMsg :: String -> a Source #

runExceptT :: ExceptT e m a -> m (Either e a) Source #

The inverse of `ExceptT`.

runExcept :: Except e a -> Either e a Source #

Extractor for computations in the exception monad. (The inverse of `except`).

class Monad m => MonadError e (m :: Type -> Type) | m -> e Source #

The strategy of combining computations that can throw exceptions by bypassing bound functions from the point an exception is thrown to the point that it is handled.

Is parameterized over the type of error information and the monad type constructor. It is common to use ``Either` String` as the monad type constructor for an error monad in which error descriptions take the form of strings. In that case and many other common cases the resulting monad is already defined as an instance of the `MonadError` class. You can also define your own error type and/or use a monad type constructor other than ``Either` `String`` or ``Either` `IOError``. In these cases you will have to explicitly define instances of the `MonadError` class. (If you are using the deprecated Control.Monad.Error or Control.Monad.Trans.Error, you may also have to define an `Error` instance.)

Minimal complete definition

throwError, catchError

#### Instances

Instances details

MonadError IOException IO |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: IOException -> IO a Source # catchError :: IO a -> (IOException -> IO a) -> IO a Source #
MonadError PandocError PandocIO |
Instance details Defined in Text.Pandoc.Class.PandocIO Methods throwError :: PandocError -> PandocIO a Source # catchError :: PandocIO a -> (PandocError -> PandocIO a) -> PandocIO a Source #
MonadError PandocError PandocPure |
Instance details Defined in Text.Pandoc.Class.PandocPure Methods throwError :: PandocError -> PandocPure a Source # catchError :: PandocPure a -> (PandocError -> PandocPure a) -> PandocPure a Source #
MonadError String TokenizerM |
Instance details Defined in Skylighting.Tokenizer Methods throwError :: String -> TokenizerM a Source # catchError :: TokenizerM a -> (String -> TokenizerM a) -> TokenizerM a Source #
MonadError () Maybe | Since: mtl-2.2.2
Instance details Defined in Control.Monad.Error.Class Methods throwError :: () -> Maybe a Source # catchError :: Maybe a -> (() -> Maybe a) -> Maybe a Source #
MonadError e (Either e) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> Either e a Source # catchError :: Either e a -> (e -> Either e a) -> Either e a Source #
(Monad m, MonadError e m) => MonadError e (ServerPartT m) |
Instance details Defined in Happstack.Server.Internal.Monads Methods throwError :: e -> ServerPartT m a Source # catchError :: ServerPartT m a -> (e -> ServerPartT m a) -> ServerPartT m a Source #
MonadError e m => MonadError e (WebT m) |
Instance details Defined in Happstack.Server.Internal.Monads Methods throwError :: e -> WebT m a Source # catchError :: WebT m a -> (e -> WebT m a) -> WebT m a Source #
MonadError e m => MonadError e (ResourceT m) |
Instance details Defined in Control.Monad.Trans.Resource.Internal Methods throwError :: e -> ResourceT m a Source # catchError :: ResourceT m a -> (e -> ResourceT m a) -> ResourceT m a Source #
MonadError e m => MonadError e (MaybeT m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> MaybeT m a Source # catchError :: MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a Source #
(Monoid w, MonadError e m) => MonadError e (AccumT w m) | Since: mtl-2.3
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> AccumT w m a Source # catchError :: AccumT w m a -> (e -> AccumT w m a) -> AccumT w m a Source #
Monad m => MonadError e (ExceptT e m) | Since: mtl-2.2
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> ExceptT e m a Source # catchError :: ExceptT e m a -> (e -> ExceptT e m a) -> ExceptT e m a Source #
MonadError e m => MonadError e (IdentityT m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> IdentityT m a Source # catchError :: IdentityT m a -> (e -> IdentityT m a) -> IdentityT m a Source #
MonadError e m => MonadError e (ReaderT r m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> ReaderT r m a Source # catchError :: ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a Source #
MonadError e m => MonadError e (StateT s m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> StateT s m a Source # catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a Source #
MonadError e m => MonadError e (StateT s m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> StateT s m a Source # catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a Source #
(Monoid w, MonadError e m) => MonadError e (WriterT w m) | Since: mtl-2.3
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> WriterT w m a Source # catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source #
(Monoid w, MonadError e m) => MonadError e (WriterT w m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> WriterT w m a Source # catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source #
(Monoid w, MonadError e m) => MonadError e (WriterT w m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> WriterT w m a Source # catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a Source #
MonadError e m => MonadError e (ConduitT i o m) |
Instance details Defined in Data.Conduit.Internal.Conduit Methods throwError :: e -> ConduitT i o m a Source # catchError :: ConduitT i o m a -> (e -> ConduitT i o m a) -> ConduitT i o m a Source #
MonadError e m => MonadError e (ParsecT s u m) |
Instance details Defined in Text.Parsec.Prim Methods throwError :: e -> ParsecT s u m a Source # catchError :: ParsecT s u m a -> (e -> ParsecT s u m a) -> ParsecT s u m a Source #
(Monoid w, MonadError e m) => MonadError e (RWST r w s m) | Since: mtl-2.3
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> RWST r w s m a Source # catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source #
(Monoid w, MonadError e m) => MonadError e (RWST r w s m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> RWST r w s m a Source # catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source #
(Monoid w, MonadError e m) => MonadError e (RWST r w s m) |
Instance details Defined in Control.Monad.Error.Class Methods throwError :: e -> RWST r w s m a Source # catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source #
MonadError e m => MonadError e (Pipe l i o u m) |
Instance details Defined in Data.Conduit.Internal.Pipe Methods throwError :: e -> Pipe l i o u m a Source # catchError :: Pipe l i o u m a -> (e -> Pipe l i o u m a) -> Pipe l i o u m a Source #

throwError :: MonadError e m => e -> m a Source #

Is used within a monadic computation to begin exception processing.

catchError :: MonadError e m => m a -> (e -> m a) -> m a Source #

A handler function to handle previous errors and return to normal execution. A common idiom is:

    do { action1; action2; action3 } `catchError` handler

where the `action` functions can call `throwError`. Note that `handler` and the do-block must have the same return type.