packages feed

pool-conduit 0.1.0.3 → 0.1.1

raw patch · 2 files changed

+13/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Conduit.Pool: withResourceT :: MonadResource m => Pool a -> (a -> m b) -> m b

Files

Data/Conduit/Pool.hs view
@@ -7,6 +7,7 @@     , P.Pool     , P.createPool     , P.withResource+    , withResourceT     ) where  import qualified Data.Pool as P@@ -25,6 +26,17 @@     -- ^ Release this resource, either destroying it or returning it to the     -- pool.     }++-- | Like 'P.withResource', but uses 'MonadResource' instead of 'MonadBaseControl'.+--+-- Since 0.1.1+withResourceT :: MonadResource m => P.Pool a -> (a -> m b) -> m b+withResourceT pool f = do+    mr <- takeResource pool+    b <- f $ mrValue mr+    mrReuse mr True+    mrRelease mr+    return b  -- | Take a resource from the pool and register a release action. takeResource :: MonadResource m => P.Pool a -> m (ManagedResource m a)
pool-conduit.cabal view
@@ -1,5 +1,5 @@ name:            pool-conduit-version:         0.1.0.3+version:         0.1.1 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>