Portability | GHC |
---|---|
Stability | experimental |
Maintainer | Simon Meier <iridcode@gmail.com> |
Safe Haskell | None |
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.
Documentation
data Either a b
The strict choice type.
Typeable2 Either | |
Functor (Either a) | |
(Eq a, Eq b) => Eq (Either a b) | |
(Data a, Data b) => Data (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) | |
Generic (Either a b) | |
(Arbitrary a, Arbitrary b) => Arbitrary (Either a b) | |
(ToJSON a, ToJSON b) => ToJSON (Either a b) | |
(FromJSON a, FromJSON b) => FromJSON (Either a b) | |
(Binary a, Binary b) => Binary (Either a b) | |
(NFData a, NFData b) => NFData (Either a b) | |
Strict (Either a b) (Either a b) |
lefts :: [Either a b] -> [a]Source
Analogous to lefts
in Data.Either.
rights :: [Either a b] -> [b]Source
Analogous to rights
in Data.Either.
partitionEithers :: [Either a b] -> ([a], [b])Source
Analogous to partitionEithers
in Data.Either.