-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Like Maybe, but with a different Monoid instance.
--
@package both
@version 0.1.0.0
-- | The Both type and operations. Like Maybe, but not.
module Data.Both
newtype Both a
Both :: Maybe a -> Both a
getBoth :: Both a -> Maybe a
-- | The mappend for Maybe is Just if either of
-- the operands are, whereas here both must be.
-- | The both function takes a default value, a function, and a
-- Both value. If the inner Maybe value is Nothing,
-- the function returns the default value. Otherwise, it applies the
-- function to the value inside the Just and returns the result.
both :: b -> (a -> b) -> Both a -> b
-- | The fromBoth function takes a default value and a Both
-- value. If the inner Maybe is Nothing, it returns the
-- default value; otherwise, it returns the value contained within.
fromBoth :: a -> Both a -> a
instance Typeable Both
instance Eq a => Eq (Both a)
instance Ord a => Ord (Both a)
instance Read a => Read (Both a)
instance Show a => Show (Both a)
instance Data a => Data (Both a)
instance Generic (Both a)
instance Generic1 Both
instance Functor Both
instance Applicative Both
instance Alternative Both
instance Monad Both
instance MonadPlus Both
instance Foldable Both
instance Traversable Both
instance Datatype D1Both
instance Constructor C1_0Both
instance Selector S1_0_0Both
instance Monoid a => Monoid (Both a)