Safe Haskell | None |
---|
- type Strategy a r = Maybe a -> (r, Decision a)
- type StrategyM m a r = Maybe a -> m (r, Decision a)
- data Decision a
- adjust :: (a -> a) -> Strategy a ()
- update :: (a -> Maybe a) -> Strategy a ()
- alter :: (Maybe a -> Maybe a) -> Strategy a ()
- insert :: a -> Strategy a ()
- delete :: Strategy a ()
- lookup :: Strategy a (Maybe a)
- adjustM :: Monad m => (a -> m a) -> StrategyM m a ()
- updateM :: Monad m => (a -> m (Maybe a)) -> StrategyM m a ()
- alterM :: Monad m => (Maybe a -> m (Maybe a)) -> StrategyM m a ()
- insertM :: Monad m => a -> StrategyM m a ()
- deleteM :: Monad m => StrategyM m a ()
- lookupM :: Monad m => StrategyM m a (Maybe a)
Documentation
type Strategy a r = Maybe a -> (r, Decision a)Source
A general modification function for some match.
By processing a Maybe
value it produces some value to emit and
a Decision
to perform on the match.
The interpretation of this function is up to the context APIs.
What to do with the focused value.
The interpretation of the commands is up to the context APIs.
Functor Decision |