multi-except-0.3.0.0: Multiple Exceptions
Copyright(c) Owen Shepherd 2021
LicenseMIT
Maintainerowen@owen.cafe
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Control.Applicative.MultiExcept

Description

 
Synopsis

Documentation

data MultiExcept err a Source #

A MultiExcept is a success value, or one or more errors.

Instances

Instances details
Bifunctor MultiExcept Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

bimap :: (a -> b) -> (c -> d) -> MultiExcept a c -> MultiExcept b d #

first :: (a -> b) -> MultiExcept a c -> MultiExcept b c #

second :: (b -> c) -> MultiExcept a b -> MultiExcept a c #

Functor (MultiExcept err) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

fmap :: (a -> b) -> MultiExcept err a -> MultiExcept err b #

(<$) :: a -> MultiExcept err b -> MultiExcept err a #

Applicative (MultiExcept err) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

pure :: a -> MultiExcept err a #

(<*>) :: MultiExcept err (a -> b) -> MultiExcept err a -> MultiExcept err b #

liftA2 :: (a -> b -> c) -> MultiExcept err a -> MultiExcept err b -> MultiExcept err c #

(*>) :: MultiExcept err a -> MultiExcept err b -> MultiExcept err b #

(<*) :: MultiExcept err a -> MultiExcept err b -> MultiExcept err a #

Foldable (MultiExcept err) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

fold :: Monoid m => MultiExcept err m -> m #

foldMap :: Monoid m => (a -> m) -> MultiExcept err a -> m #

foldMap' :: Monoid m => (a -> m) -> MultiExcept err a -> m #

foldr :: (a -> b -> b) -> b -> MultiExcept err a -> b #

foldr' :: (a -> b -> b) -> b -> MultiExcept err a -> b #

foldl :: (b -> a -> b) -> b -> MultiExcept err a -> b #

foldl' :: (b -> a -> b) -> b -> MultiExcept err a -> b #

foldr1 :: (a -> a -> a) -> MultiExcept err a -> a #

foldl1 :: (a -> a -> a) -> MultiExcept err a -> a #

toList :: MultiExcept err a -> [a] #

null :: MultiExcept err a -> Bool #

length :: MultiExcept err a -> Int #

elem :: Eq a => a -> MultiExcept err a -> Bool #

maximum :: Ord a => MultiExcept err a -> a #

minimum :: Ord a => MultiExcept err a -> a #

sum :: Num a => MultiExcept err a -> a #

product :: Num a => MultiExcept err a -> a #

Traversable (MultiExcept err) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

traverse :: Applicative f => (a -> f b) -> MultiExcept err a -> f (MultiExcept err b) #

sequenceA :: Applicative f => MultiExcept err (f a) -> f (MultiExcept err a) #

mapM :: Monad m => (a -> m b) -> MultiExcept err a -> m (MultiExcept err b) #

sequence :: Monad m => MultiExcept err (m a) -> m (MultiExcept err a) #

Alt (MultiExcept err) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

(<!>) :: MultiExcept err a -> MultiExcept err a -> MultiExcept err a #

some :: Applicative (MultiExcept err) => MultiExcept err a -> MultiExcept err [a] #

many :: Applicative (MultiExcept err) => MultiExcept err a -> MultiExcept err [a] #

(Eq a, Eq err) => Eq (MultiExcept err a) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

(==) :: MultiExcept err a -> MultiExcept err a -> Bool #

(/=) :: MultiExcept err a -> MultiExcept err a -> Bool #

(Ord a, Ord err) => Ord (MultiExcept err a) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

compare :: MultiExcept err a -> MultiExcept err a -> Ordering #

(<) :: MultiExcept err a -> MultiExcept err a -> Bool #

(<=) :: MultiExcept err a -> MultiExcept err a -> Bool #

(>) :: MultiExcept err a -> MultiExcept err a -> Bool #

(>=) :: MultiExcept err a -> MultiExcept err a -> Bool #

max :: MultiExcept err a -> MultiExcept err a -> MultiExcept err a #

min :: MultiExcept err a -> MultiExcept err a -> MultiExcept err a #

(Read a, Read err) => Read (MultiExcept err a) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

(Show a, Show err) => Show (MultiExcept err a) Source # 
Instance details

Defined in Control.Applicative.MultiExcept

Methods

showsPrec :: Int -> MultiExcept err a -> ShowS #

show :: MultiExcept err a -> String #

showList :: [MultiExcept err a] -> ShowS #

fromEither :: Either err a -> MultiExcept err a Source #

Convert an Either to a MultiExcept.

fromEitherPoly :: Either (NonEmptyDList err) a -> MultiExcept err a Source #

Convert a multi-error Either to a MultiExcept.

join :: MultiExcept err (MultiExcept err a) -> MultiExcept err a Source #

Join nested MultiExcepts with the same error type. Note that this doesn't imply a useful Monad instance. The instance defined in terms of join discards errors on the RHS of >>=.

runMultiExcept :: MultiExcept err a -> Either (NonEmptyDList err) a Source #

Run the computation.

succeed :: forall err a. a -> MultiExcept err a Source #

Embeds a value into a MultiExcept context.

throwError :: forall a err. err -> MultiExcept err a Source #

Throw a single error.

throwErrors :: forall a err. NonEmptyDList err -> MultiExcept err a Source #

Throw one or more errors.