Copyright | (c) Anton Gushcha 2016 |
---|---|
License | MIT |
Maintainer | ncrashed@gmail.com |
Stability | experimental |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
- withPatch :: Monad m => Maybe a -> (a -> b -> m b) -> b -> m b
- withPatch' :: Maybe a -> (a -> b -> b) -> b -> b
- withNullPatch :: Monad m => Maybe Bool -> (b -> m b) -> Maybe a -> (a -> b -> m b) -> b -> m b
- withNullPatch' :: Maybe Bool -> (b -> b) -> Maybe a -> (a -> b -> b) -> b -> b
Documentation
withPatch :: Monad m => Maybe a -> (a -> b -> m b) -> b -> m b Source #
Helper for implementation of HasPatch
withPatch' :: Maybe a -> (a -> b -> b) -> b -> b Source #
Helper for implementation of HasPatch
:: Monad m | |
=> Maybe Bool | If this is 'Just true' then execute following updater |
-> (b -> m b) | Updater when previous value is 'Just true' |
-> Maybe a | If the value is |
-> (a -> b -> m b) | Main updater |
-> b | |
-> m b |
Helper to implement patch with nullable flag