Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Some utilities for working with Either
.
Synopsis
- leftToMaybe :: Either l r -> Maybe l
- rightToMaybe :: Either l r -> Maybe r
- maybeToRight :: l -> Maybe r -> Either l r
- maybeToLeft :: r -> Maybe l -> Either l r
- unify :: Either a a -> a
- leftA :: Applicative m => (a -> m b) -> Either a b -> m b
Documentation
maybeToRight :: l -> Maybe r -> Either l r Source #
maybeToLeft :: r -> Maybe l -> Either l r Source #