errors-1.2.1: Simplified error-handling
Control.Error.Util
Description
Use this module to convert between Maybe, Either, MaybeT, and EitherT.
Maybe
Either
MaybeT
EitherT
Synopsis
hush :: Either a b -> Maybe bSource
Suppress the Left value of an Either
Left
hushT :: Monad m => EitherT a m b -> MaybeT m bSource
Suppress the Left value of an EitherT
note :: a -> Maybe b -> Either a bSource
Tag the Nothing value of a Maybe
Nothing
noteT :: Monad m => a -> MaybeT m b -> EitherT a m bSource
Tag the Nothing value of a MaybeT
liftMaybe :: Monad m => Maybe b -> MaybeT m bSource
Lift a Maybe to the MaybeT monad
liftEither :: Monad m => Either a b -> EitherT a m bSource
Lift an Either to the EitherT monad