unix-process-conduit 0.2.0.1 → 0.2.0.2
raw patch · 2 files changed
+9/−9 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
test/Data/Conduit/Process/UnixSpec.hs view
@@ -13,17 +13,17 @@ import Control.Monad.Trans.Class (lift) import Control.Concurrent (threadDelay) import System.Posix.Signals (sigKILL, sigTERM)+import qualified Control.Concurrent.MVar as M iorefSink :: IO (Sink ByteString IO (), IO L.ByteString) iorefSink = do- ref <- I.newIORef id- let sink = CL.mapM_ $ \bs -> do- !() <- I.atomicModifyIORef ref $ \front -> (front . (bs:), ())- return ()- getLBS = do- front <- I.readIORef ref- return $ L.fromChunks $ front []- return (sink, getLBS)+ m <- M.newEmptyMVar+ let sink front = do+ mbs <- await+ case mbs of+ Nothing -> lift $ M.putMVar m $ L.fromChunks $ front []+ Just bs -> sink $ front . (bs:)+ return (sink id, M.takeMVar m) spec :: Spec spec = describe "unix-process-conduit" $ do
unix-process-conduit.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: unix-process-conduit-version: 0.2.0.1+version: 0.2.0.2 synopsis: Run processes on Unix systems, with a conduit interface description: This library allows you to provide @conduit@ datatypes for the input and output streams. Note that you must compile your programs with @-threaded@. homepage: https://github.com/snoyberg/conduit