errors-1.2.1: Simplified error-handling

Safe HaskellSafe-Infered

Control.Error.Util

Description

Use this module to convert between Maybe, Either, MaybeT, and EitherT.

Synopsis

Documentation

hush :: Either a b -> Maybe bSource

Suppress the Left value of an Either

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

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