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

Data.Monoid.State

Synopsis

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 

Fields

run :: s -> (a, s)
 

Instances

Functor (T s) 
C (T s) 
Monoid a => Monoid (T s a) 

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