reducers-3.12.3: Semigroups, specialized containers and a general map/reduce framework

Copyright(c) Edward Kmett 2009-2011
LicenseBSD-style
Maintainerekmett@gmail.com
Stabilityexperimental
Portabilitynon-portable (MPTCs)
Safe HaskellTrustworthy
LanguageHaskell98

Data.Semigroup.MonadPlus

Description

A semigroup for working with instances of MonadPlus

Synopsis

Documentation

newtype MonadSum f a Source #

A MonadSum turns any MonadPlus instance into a Monoid.

Constructors

MonadSum 

Fields

Instances
Monad f => Monad (MonadSum f) Source # 
Instance details

Defined in Data.Semigroup.MonadPlus

Methods

(>>=) :: MonadSum f a -> (a -> MonadSum f b) -> MonadSum f b #

(>>) :: MonadSum f a -> MonadSum f b -> MonadSum f b #

return :: a -> MonadSum f a #

fail :: String -> MonadSum f a #

Functor f => Functor (MonadSum f) Source # 
Instance details

Defined in Data.Semigroup.MonadPlus

Methods

fmap :: (a -> b) -> MonadSum f a -> MonadSum f b #

(<$) :: a -> MonadSum f b -> MonadSum f a #

Applicative f => Applicative (MonadSum f) Source # 
Instance details

Defined in Data.Semigroup.MonadPlus

Methods

pure :: a -> MonadSum f a #

(<*>) :: MonadSum f (a -> b) -> MonadSum f a -> MonadSum f b #

liftA2 :: (a -> b -> c) -> MonadSum f a -> MonadSum f b -> MonadSum f c #

(*>) :: MonadSum f a -> MonadSum f b -> MonadSum f b #

(<*) :: MonadSum f a -> MonadSum f b -> MonadSum f a #

Alternative f => Alternative (MonadSum f) Source # 
Instance details

Defined in Data.Semigroup.MonadPlus

Methods

empty :: MonadSum f a #

(<|>) :: MonadSum f a -> MonadSum f a -> MonadSum f a #

some :: MonadSum f a -> MonadSum f [a] #

many :: MonadSum f a -> MonadSum f [a] #

MonadPlus f => MonadPlus (MonadSum f) Source # 
Instance details

Defined in Data.Semigroup.MonadPlus

Methods

mzero :: MonadSum f a #

mplus :: MonadSum f a -> MonadSum f a -> MonadSum f a #

MonadPlus f => Reducer (f a) (MonadSum f a) Source # 
Instance details

Defined in Data.Semigroup.MonadPlus

Methods

unit :: f a -> MonadSum f a Source #

snoc :: MonadSum f a -> f a -> MonadSum f a Source #

cons :: f a -> MonadSum f a -> MonadSum f a Source #

MonadPlus f => Semigroup (MonadSum f a) Source # 
Instance details

Defined in Data.Semigroup.MonadPlus

Methods

(<>) :: MonadSum f a -> MonadSum f a -> MonadSum f a #

sconcat :: NonEmpty (MonadSum f a) -> MonadSum f a #

stimes :: Integral b => b -> MonadSum f a -> MonadSum f a #

MonadPlus f => Monoid (MonadSum f a) Source # 
Instance details

Defined in Data.Semigroup.MonadPlus

Methods

mempty :: MonadSum f a #

mappend :: MonadSum f a -> MonadSum f a -> MonadSum f a #

mconcat :: [MonadSum f a] -> MonadSum f a #