monoid-transformer-0.0.2: Monoid counterparts to some ubiquitous monad transformersSource codeContentsIndex
Data.Monoid.State
Synopsis
newtype T s a = Cons {
run :: s -> (a, s)
}
pure :: a -> T s a
evaluate :: s -> T s a -> a
execute :: s -> T s a -> s
put :: Monoid a => s -> T s a
modify :: Monoid a => (s -> s) -> T s a
mapFst :: (a -> c) -> (a, b) -> (c, b)
Documentation
newtype T s a Source

This resembles the pure State monad. However, State in transformers is a StateT and mtl is not Haskell 98.

I hope I have the more natural parameter order for evaluate in contrast to mtl and transformers. However, it is different from the parameter order of run.

Constructors
Cons
run :: s -> (a, s)
pure :: a -> T s aSource
evaluate :: s -> T s a -> aSource
execute :: s -> T s a -> sSource
put :: Monoid a => s -> T s aSource
modify :: Monoid a => (s -> s) -> T s aSource
mapFst :: (a -> c) -> (a, b) -> (c, b)Source
Produced by Haddock version 2.6.1