unification-fd-0.9.0: Simple generic unification algorithms.

CopyrightCopyright (c) 2008--2014 wren gayle romano
LicenseBSD
Maintainerwren@community.haskell.org
Stabilityperpetually unstable
Portabilitysemi-portable (MPTCs)
Safe HaskellSafe-Inferred
LanguageHaskell98

Control.Monad.State.UnificationExtras

Contents

Description

This module defines some extra functions for Control.Monad.State.Lazy. This package really isn't the proper place for these, but we need them to be somewhere.

TODO: patch transformers/mtl-2 with these functions.

Synopsis

Additional functions for MTL

liftReader :: Reader e a -> State e a Source

Lift a reader into a state monad. More particularly, this allows disabling mutability in a local context within State.

liftReaderT :: Monad m => ReaderT e m a -> StateT e m a Source

Lift a reader into a state monad. More particularly, this allows disabling mutability in a local context within StateT.

modify' :: MonadState s m => (s -> s) -> m () Source

A strict version of modify.

localState :: MonadState s m => m a -> m a Source

Run a state action and undo the state changes at the end.