packages feed

resourcet 1.2.4.2 → 1.2.4.3

raw patch · 4 files changed

+29/−4 lines, 4 files

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # ChangeLog for resourcet ++## 1.2.4.3++* Fix a space leak when using `forever` with `ResourceT`. [#470](https://github.com/snoyberg/conduit/pull/470)+ ## 1.2.4.2  * Mask exceptions in `Acquire` allocation action
Control/Monad/Trans/Resource/Internal.hs view
@@ -220,6 +220,10 @@     pure = ResourceT . const . pure     ResourceT mf <*> ResourceT ma = ResourceT $ \r ->         mf r <*> ma r+    ResourceT mf *> ResourceT ma = ResourceT $ \r ->+        mf r *> ma r+    ResourceT mf <* ResourceT ma = ResourceT $ \r ->+        mf r <* ma r  -- | Since 1.1.5 instance Alternative m => Alternative (ResourceT m) where
Data/Acquire/Internal.hs view
@@ -66,17 +66,33 @@  -- | Create an @Acquire@ value using the given allocate and free functions. --+-- To acquire and free the resource in an arbitrary monad with `MonadUnliftIO`,+-- do the following:+--+-- > acquire <- withRunInIO $ \runInIO ->+-- >   return $ mkAcquire (runInIO create) (runInIO . free)+--+-- Note that this is only safe if the Acquire is run and freed within the same+-- monadic scope it was created in.+-- -- @since 1.1.0 mkAcquire :: IO a -- ^ acquire the resource           -> (a -> IO ()) -- ^ free the resource           -> Acquire a-mkAcquire create free = Acquire $ \_ -> do-    x <- create-    return $! Allocated x (const $ free x)+mkAcquire create free = mkAcquireType create (\a _ -> free a)  -- | Same as 'mkAcquire', but the cleanup function will be informed of /how/ -- cleanup was initiated. This allows you to distinguish, for example, between -- normal and exceptional exits.+--+-- To acquire and free the resource in an arbitrary monad with `MonadUnliftIO`,+-- do the following:+--+-- > acquire <- withRunInIO $ \runInIO ->+-- >   return $ mkAcquireType (runInIO create) (\a -> runInIO . free a)+--+-- Note that this is only safe if the Acquire is run and freed within the same+-- monadic scope it was created in. -- -- @since 1.1.2 mkAcquireType
resourcet.cabal view
@@ -1,5 +1,5 @@ Name:                resourcet-Version:             1.2.4.2+Version:             1.2.4.3 Synopsis:            Deterministic allocation and freeing of scarce resources. description:         Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/resourcet>. License:             BSD3