| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
Control.Monad.Either
Description
Incompatible with Control.Monad.Error, but removes the Error restriction that prevents a natural encoding of Apomorphisms. This module is therefore incompatible with Control.Monad.Error
Documentation
data Either a b
The Either type represents values with two possibilities: a value of
type is either Either a b or Left a.
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").
Instances
| Typeable2 Either | |
| Coassociative Hask Either | |
| Associative Hask Either | |
| Symmetric Hask Either | |
| Braided Hask Either | |
| Bizap Either (,) | |
| Bizap (,) Either | |
| PreCoCartesian Hask Either | |
| QFunctor Either Hask Hask | |
| PFunctor Either Hask Hask | |
| Distributive Hask (,) Either | |
| Bifunctor Either Hask Hask Hask | |
| Monad (Either e) | |
| Functor (Either a) | |
| MonadFix (Either e) | |
| Applicative (Either e) | |
| Monoid a => HasLimit (Either a) | |
| Pointed (Either a) | |
| Cozip (Either c) | |
| Monoid a => Zip (Either a) | |
| CFunctor (Either a) Hask Hask | |
| (Eq a, Eq b) => Eq (Either a b) | |
| (Ord a, Ord b) => Ord (Either a b) | |
| (Read a, Read b) => Read (Either a b) | |
| (Show a, Show b) => Show (Either a b) | |
| Representable (EitherF a b) (Either a b) |