shell-conduit-4.4: Write shell scripts with Conduit

Safe HaskellNone
LanguageHaskell98

Data.Conduit.Shell.Process

Contents

Description

Reading from the process.

Synopsis

Running scripts

run :: Segment r -> IO r Source

Run a segment.

Conduit types

text :: (r ~ (), m ~ IO) => ConduitM Text Text m r -> Segment r Source

Work on the stream as Text values from UTF-8.

bytes :: (a ~ ByteString, m ~ IO) => ConduitM a ByteString m r -> Segment r Source

Lift a conduit into a segment.

General conduits

conduit :: (a ~ ByteString, m ~ IO) => ConduitM a ByteString m r -> Segment r Source

Lift a conduit into a segment.

conduitEither :: (a ~ ByteString, m ~ IO) => ConduitM a (Either ByteString ByteString) m r -> Segment r Source

Lift a conduit into a segment, which can yield stderr.

Running processes

shell :: String -> Segment () Source

Run a shell command.

proc :: String -> [String] -> Segment () Source

Run a process command.

($|) :: Segment () -> Segment b -> Segment b infixl 0 Source

Fuse two segments (either processes or conduits).

data Segment r Source

A pipeable segment. Either a conduit or a process.

class ToChunk a where Source

Used to allow outputting stdout or stderr.

tryS :: Exception e => Segment r -> Segment (Either e r) Source

Try something in a segment.