shell-conduit-3.0: Write shell scripts with Conduit

Safe HaskellNone
LanguageHaskell98

Data.Conduit.Shell.Process

Contents

Description

Reading from the process.

Synopsis

Running scripts

run :: (MonadIO m, MonadBaseControl IO m) => Conduit Chunk (ShellT m) Chunk -> m () Source

Run a shell scripting conduit.

Running processes

shell :: MonadResource m => String -> Conduit Chunk m Chunk Source

Run a shell command.

proc :: MonadResource m => String -> [String] -> Conduit Chunk m Chunk Source

Run a shell command.

I/O chunks

bytes :: Monad m => Conduit Chunk m ByteString Source

Extract the stdout values from the stream, discarding any errors.

unbytes :: Monad m => Conduit ByteString m Chunk Source

Extract the stdout values from the stream, discarding any errors.

withRights :: Monad m => Conduit ByteString m ByteString -> Conduit Chunk m Chunk Source

Do something with just the rights.

redirect :: Monad m => ChunkType -> Conduit Chunk m Chunk Source

Redirect the given chunk type to the other type.

quiet :: (Monad m, MonadIO m) => Conduit Chunk m Chunk -> Conduit Chunk m Chunk Source

Discard any output from the command: make it quiet.

writeChunks :: MonadIO m => Consumer Chunk m () Source

Write chunks to stdout and stderr.

discardChunks :: MonadIO m => Consumer Chunk m () Source

Discard all chunks.

Low-level internals