rio-0.1.5.0: A standard library for Haskell

RIO.State

Description

Provides reexports of MonadState and related helpers.

Since: rio-0.1.4.0

Synopsis

# Documentation

class Monad m => MonadState s (m :: * -> *) | m -> s where #

Minimal definition is either both of get and put or just state

Minimal complete definition

Methods

get :: m s #

Return the state from the internals of the monad.

put :: s -> m () #

Replace the state inside the monad.

state :: (s -> (a, s)) -> m a #

Embed a simple state action into the monad.

Instances