**Packages**- base
- package
- bytestring
- containers

The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b.
The Either type is sometimes used to represent a value which is either correct or an error; by convention, the Left constructor is used to hold an error value and the Right constructor is used to hold a correct value (mnemonic: "right" also means "correct").

The Either type, and associated operations.

Support for computations with informative failures.
Version 0.2.0

Case analysis for the Either type. If the value is Left a, apply the first function to a; if it is Right b, apply the second function to b.

An either monad transformer
Version 4.1

Functions for probing and unwrapping values inside of Either.
Version 1.1

Encode an Either value using the first BoundedPrim for Left values and the second BoundedPrim for Right values.
Note that the functions eitherB, pairB, and contramapB (written below using >$<) suffice to construct BoundedPrims for all non-recursive algebraic datatypes. For example,
> maybeB :: BoundedPrim () -> BoundedPrim a -> BoundedPrim (Maybe a)
> maybeB nothing just = maybe (Left ()) Right >$< eitherB nothing just

Collection of functions for dealing with Either values.
Version 0.1.0

Partitions a list of Either into two lists All the Left elements are extracted, in order, to the first component of the output. Similarly the Right elements are extracted to the second component of the output.

The standard Either datatype suffers from a lack of monad and applicative instances. To make matters worse, the mtl and transformers packages provide orphan instances which conflict with each other, as well as defining a transformer version which has an usually unnecessary superclass constraint.
Besides these annoyances, there is another issue: there exist two reasonable definitions of the Applicative instance for Either: one the holds onto only the first Left value, or one that appends all Left values together via a Monoid instance. The former is compatible with the monad instance, while the latter is not.
This package defines three datatypes, some helpers functions and instances. The data types are AEither, MEither and MEitherT. AEither provides an Applicative instance which appends Left values, MEither provides the monadic definition, and MEitherT is a monad transformer.
Version 0.3.1.1