monad-extras 0.5.2 → 0.5.3
raw patch · 2 files changed
+7/−1 lines, 2 filesdep +stm
Dependencies added: stm
Files
- Control/Monad/Extra.hs +5/−0
- monad-extras.cabal +2/−1
Control/Monad/Extra.hs view
@@ -13,6 +13,7 @@ import Control.Monad.Morph import Control.Monad.Trans.Cont import Control.Monad.Trans.Control+import Control.Monad.STM import Data.IORef -- | Synonym for @return ()@.@@ -75,6 +76,10 @@ -- | Lift a 'Maybe' value into the 'MaybeT' monad transformer. liftMaybe :: MonadPlus m => Maybe a -> m a liftMaybe = maybe mzero return++-- | A transformer-friendly version of 'atomically'.+atomicallyM :: MonadIO m => STM a -> m a+atomicallyM = liftIO . atomically -- | Embed a transformer (Kleisli) arrow as an arrow in the base monad -- returning a mutated transformer state. If you do not want the
monad-extras.cabal view
@@ -1,5 +1,5 @@ name: monad-extras-version: 0.5.2+version: 0.5.3 synopsis: Extra utility functions for working with monads -- description: homepage: http://github.com/jwiegley/monad-extras@@ -22,3 +22,4 @@ , monad-control , transformers , transformers-base+ , stm