Copyright | (c) 2006-2007 Roman Leshchinskiy (c) 2013 Simon Meier |
---|---|

License | BSD-style (see the file LICENSE) |

Maintainer | Simon Meier <iridcode@gmail.com> |

Stability | experimental |

Portability | GHC |

Safe Haskell | None |

Language | Haskell98 |

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.

- data Either a b :: * -> * -> *
- isRight :: Either a b -> Bool
- isLeft :: Either a b -> Bool
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- lefts :: [Either a b] -> [a]
- rights :: [Either a b] -> [b]
- partitionEithers :: [Either a b] -> ([a], [b])
- _Left :: Prism (Either a c) (Either b c) a b
- _Right :: Prism (Either c a) (Either c b) a b

# Documentation

partitionEithers :: [Either a b] -> ([a], [b]) Source #

Analogous to `partitionEithers`

in Data.Either.

# Orphan instances

Bitraversable Either Source # | |

Bifoldable Either Source # | |

Bifunctor Either Source # | |

Swapped Either Source # | |

Foldable (Either e) Source # | |

Traversable (Either e) Source # | |

(Data a, Data b) => Data (Either a b) Source # | |

Generic (Either a b) Source # | |

(Arbitrary a, Arbitrary b) => Arbitrary (Either a b) Source # | |

(Hashable a, Hashable b) => Hashable (Either a b) Source # | |

(ToJSON a, ToJSON b) => ToJSON (Either a b) Source # | |

(FromJSON a, FromJSON b) => FromJSON (Either a b) Source # | |

(Binary a, Binary b) => Binary (Either a b) Source # | |

(NFData a, NFData b) => NFData (Either a b) Source # | |

Strict (Either a b) (Either a b) Source # | |