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

Safe HaskellSafe-Inferred

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.

Could also be written as Monoid.Applicative (Monad.Trans.State s) a.

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