packages feed

process-extras 0.4 → 0.4.1

raw patch · 3 files changed

+8/−8 lines, 3 filesdep ~basedep ~deepseq

Dependency ranges changed: base, deepseq

Files

process-extras.cabal view
@@ -1,5 +1,5 @@ Name:               process-extras-Version:            0.4+Version:            0.4.1 Synopsis:           Process extras Description:        Extends <http://hackage.haskell.org/package/process>.                     Read process input and output as ByteStrings or
src/System/Process/Common.hs view
@@ -33,7 +33,7 @@ import Utils (forkWait)  #if __GLASGOW_HASKELL__ <= 709-import Control.Applicative (pure, (<$>), (<*>))+import Control.Applicative ((<$>), (<*>)) import Data.Monoid (Monoid(mempty, mappend)) #endif @@ -142,7 +142,7 @@        do -- fork off a thread to start consuming stdout           -- Without unsafeIntereleaveIO the pid messsage gets stuck           -- until some additional output arrives from the process.-          waitOut <- forkWait $ (<>) <$> pure (pidf pid)+          waitOut <- forkWait $ (<>) <$> return (pidf pid)                                      <*> unsafeInterleaveIO (readInterleaved [(outf, outh), (errf, errh)] (codef <$> waitForProcess pid))           writeInput inh input           waitOut)@@ -199,4 +199,4 @@ -- before they have read all of their input. ignoreResourceVanished :: IO () -> IO () ignoreResourceVanished action =-    action `catch` (\e -> if ioe_type e == ResourceVanished then pure () else ioError e)+    action `catch` (\e -> if ioe_type e == ResourceVanished then return pure () else ioError e)
src/System/Process/ListLike.hs view
@@ -113,10 +113,10 @@  -- | Send Stdout chunks to stdout and Stderr chunks to stderr. writeOutput :: ListLikeIO a c => [Chunk a] -> IO ()-writeOutput [] = pure ()+writeOutput [] = return () writeOutput (x : xs) =-    foldOutput (\_ -> pure ())+    foldOutput (\_ -> return ())                (hPutStr stdout)                (hPutStr stderr)-               (\_ -> pure ())-               (\_ -> pure ()) x >> writeOutput xs+               (\_ -> return ())+               (\_ -> return ()) x >> writeOutput xs