error-util-0.0.0.1: Set of utils and operators for error handling

Safe HaskellSafe
LanguageHaskell2010

Control.Error.Util

Synopsis

Documentation

(<?>) :: Maybe b -> a -> Either a b infixl 4 Source

(<?&>) :: Either a (Maybe b) -> a -> Either a b infixl 4 Source

(<??>) :: Monad m => Maybe b -> a -> ExceptT a m b infixl 4 Source

(<??&>) :: Monad m => ExceptT a m (Maybe b) -> a -> ExceptT a m b infixl 4 Source

(<?.>) :: Monad m => Maybe b -> String -> m b infixl 4 Source

(<?&.>) :: Monad m => m (Maybe b) -> String -> m b infixl 4 Source

assert :: Bool -> a -> Either a () Source

assert in Either monad, using Left to raise error

assertE :: Monad m => Bool -> a -> ExceptT a m () Source

assert in ExceptT monad, using throwE to raise error

assertM :: Monad m => Bool -> String -> m () Source

assert in any monad, using fail to raise error