multi-except-0.1.4.0: Multiple Exceptions
Copyright(c) Owen Shepherd 2021
LicenseMIT
Maintainerowen@owen.cafe
Stabilitystable
Portabilityportable
Safe HaskellSafe-Inferred
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
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 #

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 (DNonEmpty 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 valid Monad instance.

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

Run the computation.

succeed :: a -> MultiExcept err a Source #

Embeds a value into a MultiExcept context.

throwError :: err -> MultiExcept err a Source #

Throw a single error.

throwErrors :: DNonEmpty err -> MultiExcept err a Source #

Throw one or more errors.