mtl-unleashed-0.6: MTL classes without the functional dependency

Safe HaskellNone
LanguageHaskell2010

Control.Monad.States

Description

MonadState without the function dependency m -> s.

Synopsis

Documentation

class Monad m => MonadStates s m where Source

Minimal complete definition

statePoly | getPoly, putPoly

Methods

getPoly :: m s Source

putPoly :: s -> m () Source

Replace the state inside the monad.

modifyPoly :: (Monad m, MonadStates s m) => (s -> s) -> m () Source

usePoly :: forall s m a. (Monad m, MonadStates s m) => Getting a s a -> m a Source

overPoly :: forall s m a. (Monad m, MonadStates s m) => ASetter s s a a -> (a -> a) -> m () Source

Modify part of the s