Either is:module

The Either type, and associated operations.
The strict variant of the standard Haskell Either type and the corresponding variants of the functions from Data.Either. Note that the strict Either type is not an applicative functor, and therefore also no monad. The reasons are the same as the ones for the strict Maybe type, which are explained in Data.Maybe.Strict.
Utilities to work with Either data type.
TextShow instance for Either. Since: 2
A carrier for an Error effect.
A carrier for a Fail effect, returning the result as an Either String. Failed computations will return a Left containing the String value passed to fail.
A carrier for a Throw effect.
Utilites to work with Either data type.
Symbolic coproduct, symbolic version of Haskell's Either type.
Useful abstractions for type level programming using Either.
Utilities for the Either type.
The Either type, and associated operations.
Bidirectional version of Data.Either.
Some utilities for working with Either.
This monad transformer extends Control.Monad.Trans.Except with a more familar Either naming.
This module provides throwEither and catchEither for Either. These two functions reside here because throwEither and catchEither correspond to return and (>>=) for the flipped Either monad: EitherR. Additionally, this module defines handleE as the flipped version of catchE for ExceptT. throwEither and catchEither improve upon MonadError because:
  • catchEither is more general than catch and allows you to change the left value's type
  • Both are Haskell98
More advanced users can use EitherR and ExceptRT to program in an entirely symmetric "success monad" where exceptional results are the norm and successful results terminate the computation. This allows you to chain error-handlers using do notation and pass around exceptional values of varying types until you can finally recover from the error:
runExceptRT $ do
e2   <- ioExceptionHandler e1
bool <- arithmeticExceptionhandler e2
when bool $ lift $ putStrLn "DEBUG: Arithmetic handler did something"
If any of the above error handlers succeed, no other handlers are tried. If you choose not to typefully distinguish between the error and sucess monad, then use flipEither and flipET, which swap the type variables without changing the type.
A continuation-passing variant of Either for short-circuiting at failure. This code is based on Control.Monad.MaybeK.