packages feed

machines-process 0.2.0.10 → 7.0.0.2

raw patch · 2 files changed

Files

machines-process.cabal view
@@ -1,5 +1,5 @@ name:                machines-process-version:             0.2.0.10+version:             7.0.0.2 synopsis:            Process (system) utilities for the machines library homepage:            http://github.com/aloiscochard/machines-process license:             Apache-2.0@@ -20,5 +20,5 @@       base                >= 4.6      && < 5     , chunked-data        >= 0.1      && < 0.4     , machines            >= 0.2      && < 0.8-    , machines-io         >= 0.2      && < 0.3+    , machines-io         >= 0.2      && < 7.1     , process             >= 1.1      && < 1.7
src/System/Process/Machine.hs view
@@ -9,6 +9,7 @@  type ProcessMachines a b k = (Maybe (ProcessT IO a b), Maybe (MachineT IO k a), Maybe (MachineT IO k a)) + mStdIn :: IOSource a -> ProcessMachines a a0 k0 -> IO () mStdIn ms (Just stdIn, _, _)  = runT_ $ stdIn <~ ms mStdIn _  _                   = return ()@@ -16,6 +17,13 @@ mStdOut :: ProcessT IO a b -> ProcessMachines a a0 k0 -> IO [b] mStdOut mp (_, Just stdOut, _)  = runT $ mp <~ stdOut mStdOut _  _                    = return []++mStdOutputs :: ProcessT IO (Either a a) b -> ProcessMachines a a0 (Is a0) -> IO [b]+mStdOutputs mp (_, Just stdOut, Just stdErr)  = runT $ mp <~ wye stdErr stdOut slurp where+  slurp = repeatedly $ do+    res <- awaits Z+    yield res+mStdOutputs _  _                              = return []  {-- mStdOut_ :: ProcessT IO a b -> ProcessMachines a a0 k0 -> IO ()