Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Macaw.Utils.Changed
Description
This module defines a monad Changed
that is designed for supporting
functions which take a value of some type as an argument, and may
modify it's value.
It is primarily used for abstract domains so that we know if we need to re-explore a block when joining new edges into the state.
Synopsis
- data Changed s a
- runChanged :: (forall s. Changed s a) -> Maybe a
- markChanged :: Bool -> Changed s ()
- changedST :: ST s a -> Changed s a
Documentation
A monad that can be used to record when a value is changed.
runChanged :: (forall s. Changed s a) -> Maybe a Source #
Run the changed computation and return the value if changed,
and Nothing
if not.
markChanged :: Bool -> Changed s () Source #
Record the value has changed if the Boolean is true.