monoid-transformer-0.0.4: Monoid counterparts to some ubiquitous monad transformers

Safe HaskellSafe
LanguageHaskell98

Data.Monoid.MonadicEndo

Synopsis

Documentation

newtype T m a Source #

Like Data.Monoid.Endo but with monadic result. mempty is return and mappend is <=<.

Useful e.g. for handling options with GetOpt.

Constructors

Cons 

Fields

  • run :: a -> m a
     

Instances

Monad m => Semigroup (T m a) Source # 

Methods

(<>) :: T m a -> T m a -> T m a #

sconcat :: NonEmpty (T m a) -> T m a #

stimes :: Integral b => b -> T m a -> T m a #

Monad m => Monoid (T m a) Source # 

Methods

mempty :: T m a #

mappend :: T m a -> T m a -> T m a #

mconcat :: [T m a] -> T m a #