-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Extra utilities for working on Data.* types. -- -- Extra utilities for working on Data.* types. @package data-extra @version 1.0.0 -- | Extra functions for dealing with Maybe. module Data.Maybe.Extra -- | When the predicate is true, return maybe the action's return value. whenMaybe :: Monad m => Bool -> m a -> m (Maybe a) -- | Extra functions for dealing with Either. module Data.Either.Extra -- | A map for Either values. mapEither :: (a -> b1) -> (b -> b2) -> Either a b -> Either b1 b2 -- | Maybe get the left side of an Either. leftToMaybe :: Either a b -> Maybe a -- | Maybe get the right side of an Either. rightToMaybe :: Either a b -> Maybe b -- | Is a value Left? isLeft :: Either a b -> Bool -- | Is a value Right? isRight :: Either a b -> Bool -- | Extract the left value or a default. fromLeft :: a -> Either a b -> a -- | Extract the right value or a default. fromRight :: b -> Either a b -> b