packages feed

resourcet 0.4.6 → 0.4.7

raw patch · 2 files changed

+12/−1 lines, 2 filesdep +mmorphPVP ok

version bump matches the API change (PVP)

Dependencies added: mmorph

API changes (from Hackage documentation)

+ Control.Monad.Trans.Resource: instance MFunctor ResourceT
+ Control.Monad.Trans.Resource: instance MMonad ResourceT

Files

Control/Monad/Trans/Resource.hs view
@@ -116,6 +116,7 @@ import qualified Control.Monad.ST.Lazy as Lazy  import Data.Functor.Identity (Identity, runIdentity)+import Control.Monad.Morph  -- | A lookup key for a specific release action. This value is returned by -- 'register' and 'allocate', and is passed to 'release'.@@ -385,11 +386,20 @@ -- | Transform the monad a @ResourceT@ lives in. This is most often used to -- strip or add new transformers to a stack, e.g. to run a @ReaderT@. --+-- Note that this function is a slight generalization of 'hoist'.+-- -- Since 0.3.0 transResourceT :: (m a -> n b)                -> ResourceT m a                -> ResourceT n b transResourceT f (ResourceT mx) = ResourceT (\r -> f (mx r))++-- | Since 0.4.7+instance MFunctor ResourceT where+    hoist f (ResourceT mx) = ResourceT (\r -> f (mx r))+-- | Since 0.4.7+instance MMonad ResourceT where+    embed f m = ResourceT (\i -> unResourceT (f (unResourceT m i)) i)  -- | This function mirrors @join@ at the transformer level: it will collapse -- two levels of @ResourceT@ into a single @ResourceT@.
resourcet.cabal view
@@ -1,5 +1,5 @@ Name:                resourcet-Version:             0.4.6+Version:             0.4.7 Synopsis:            Deterministic allocation and freeing of scarce resources. Description: 	This package was originally included with the conduit package, and has since been split off. For more information, please see <http://www.yesodweb.com/book/conduits>.@@ -21,6 +21,7 @@                      , containers                      , transformers             >= 0.2.2        && < 0.4                      , mtl                      >= 2.0          && < 2.2+                     , mmorph   ghc-options:     -Wall  test-suite test