packages feed

conduit-extra 1.1.13.2 → 1.1.13.3

raw patch · 3 files changed

+17/−10 lines, 3 filesdep ~streaming-commonsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: streaming-commons

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,8 @@+## 1.1.13.3++* `withCheckedProcessCleanup` properly closes opened `Handle`s+  [#280](https://github.com/snoyberg/conduit/issues/280)+ ## 1.1.13.2  * Fix alignment issues on non-X86 archs
Data/Conduit/Process.hs view
@@ -31,7 +31,7 @@ import Data.Conduit.Binary (sourceHandle, sinkHandle) import Data.ByteString (ByteString) import Control.Concurrent.Async (runConcurrently, Concurrently(..))-import Control.Monad.Catch (MonadMask, onException, throwM, finally)+import Control.Monad.Catch (MonadMask, onException, throwM, finally, bracket) #if (__GLASGOW_HASKELL__ < 710) import Control.Applicative ((<$>), (<*>)) #endif@@ -140,13 +140,15 @@     => CreateProcess     -> (stdin -> stdout -> stderr -> m b)     -> m b-withCheckedProcessCleanup cp f = do-    (x, y, z, sph) <- streamingProcess cp-    res <- f x y z `onException` liftIO (terminateStreamingProcess sph)-    ec <- waitForStreamingProcess sph-    if ec == ExitSuccess-        then return res-        else throwM $ ProcessExitedUnsuccessfully cp ec+withCheckedProcessCleanup cp f = bracket+    (streamingProcess cp)+    (\(_, _, _, sph) -> closeStreamingProcessHandle sph)+    $ \(x, y, z, sph) -> do+        res <- f x y z `onException` liftIO (terminateStreamingProcess sph)+        ec <- waitForStreamingProcess sph+        if ec == ExitSuccess+            then return res+            else throwM $ ProcessExitedUnsuccessfully cp ec   terminateStreamingProcess :: StreamingProcessHandle -> IO ()
conduit-extra.cabal view
@@ -1,5 +1,5 @@ Name:                conduit-extra-Version:             1.1.13.2+Version:             1.1.13.3 Synopsis:            Batteries included conduit: adapters for common libraries. Description:     The conduit package itself maintains relative small dependencies. The purpose of this package is to collect commonly used utility functions wrapping other library dependencies, without depending on heavier-weight dependencies. The basic idea is that this package should only depend on haskell-platform packages and conduit.@@ -59,7 +59,7 @@                      , process                      , resourcet                >= 1.1                      , stm-                     , streaming-commons        >= 0.1.11+                     , streaming-commons        >= 0.1.16    ghc-options:     -Wall