| 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 | |
| Bifunctor Either | |
| Coassociative Either | |
| Associative Either | |
| Symmetric Either | |
| Braided Either | |
| BiZap Either (,) | |
| BiZap (,) Either | |
| Monad (Either e) | |
| Functor (Either a) | |
| MonadFix (Either e) | |
| Applicative (Either e) | |
| Pointed (Either a) | |
| Cozip (Either c) | |
| Monoid a => Zip (Either a) | |
| (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) | |
| (Copointed f, Copointed g) => Copointed (BifunctorF Either f g) | |
| Functor f => PPointed (BiffB Either Identity f) | |
| Functor f => PApplicative (BiffB Either Identity f) | |
| Functor f => PMonad (BiffB Either Identity f) |