fclabels-monadlib-0.0.1: src/Data/Record/Label/MonadLib.hs
module Data.Record.Label.MonadLib ( module L
, modM
, setM
, getM
) where
import Data.Record.Label as L hiding (modM, setM, getM)
import MonadLib.Monads
modM :: StateM m f => (f :-> a) -> (a -> a) -> m ()
modM l f = liftM (modL l f) get >>= set
setM :: StateM m f => (f :-> a) -> a -> m ()
setM l a = liftM (setL l a) get >>= set
getM :: StateM m f => (f :-> a) -> m a
getM l = liftM (getL l) get