module Data.Monoid.Monad.State.Strict
( module Control.Monad.State.Strict
, module Data.Monoid.Reducer
) where
import Control.Monad.State.Strict
import Data.Monoid.Reducer
instance Monoid m => Monoid (State s m) where
mempty = return mempty
mappend = liftM2 mappend
instance (Monad m, Monoid n) => Monoid (StateT s m n) where
mempty = return mempty
mappend = liftM2 mappend
instance Monoid m => Reducer m (State s m) where
unit = return
instance (Monad m, Monoid n) => Reducer n (StateT s m n) where
unit = return
instance (Monad m, Monoid n) => Reducer (m n) (StateT s m n) where
unit = lift