Safe Haskell | Safe-Inferred |
---|

Extra functions for dealing with Either.

- mapEither :: (a -> b1) -> (b -> b2) -> Either a b -> Either b1 b2
- leftToMaybe :: Either a b -> Maybe a
- rightToMaybe :: Either a b -> Maybe b
- isLeft :: Either a b -> Bool
- isRight :: Either a b -> Bool
- fromLeft :: a -> Either a b -> a
- fromRight :: b -> Either a b -> b
- whenRight :: Monad m => Either a b -> (b -> m c) -> m ()
- whenLeft :: Monad m => Either a b -> (a -> m c) -> m ()