conduit-extra-1.1.9.3: Batteries included conduit: adapters for common libraries.

Safe HaskellNone
LanguageHaskell98

Data.Conduit.Process

Contents

Description

A full tutorial for this module is available on FP School of Haskell: https://www.fpcomplete.com/user/snoyberg/library-documentation/data-conduit-process.

Note that this is a very thin layer around the Data.Streaming.Process module. In particular, it:

  • Provides orphan instances for conduit
  • Provides some useful helper functions

Synopsis

Functions

sourceCmdWithConsumer :: MonadIO m => String -> Consumer ByteString m a -> m (ExitCode, a) Source #

Like sourceProcessWithConsumer but providing the command to be run as a String.

Since 1.1.2

sourceProcessWithConsumer :: MonadIO m => CreateProcess -> Consumer ByteString m a -> m (ExitCode, a) Source #

Given a CreateProcess, run the process, with its output being used as a Source to feed the provided Consumer. Once the process has completed, return a tuple of the ExitCode from the process and the output collected from the Consumer.

Since 1.1.2

Reexport

Orphan instances

((~) * r (), (~) * r' (), MonadIO m, MonadIO n, (~) * i ByteString) => InputSource (ConduitM i o m r, n r') Source # 

Methods

isStdStream :: (Maybe Handle -> IO (ConduitM i o m r, n r'), Maybe StdStream) #

((~) * r (), (~) * r' (), MonadIO m, MonadIO n, (~) * o ByteString) => OutputSink (ConduitM i o m r, n r') Source # 

Methods

osStdStream :: (Maybe Handle -> IO (ConduitM i o m r, n r'), Maybe StdStream) #

((~) * r (), MonadIO m, (~) * i ByteString) => InputSource (ConduitM i o m r) Source # 

Methods

isStdStream :: (Maybe Handle -> IO (ConduitM i o m r), Maybe StdStream) #

((~) * r (), MonadIO m, (~) * o ByteString) => OutputSink (ConduitM i o m r) Source # 

Methods

osStdStream :: (Maybe Handle -> IO (ConduitM i o m r), Maybe StdStream) #