sub-state-0.0.0.1: Get the total, put a single element

Safe HaskellNone
LanguageHaskell2010

Control.Monad.State.Sub

Synopsis

Documentation

class MonadSubState i a s m where Source

lookup i =<< (putSingle x >> getTotal) ~ return (Just x)

Methods

getTotal :: m s Source

putSingle :: a -> m () Source

Instances

(HasInsertWith i a s, MonadState s m, MonadReader i m) => MonadSubState i a s m Source