process-extras-0.3.0: Process extras

Safe HaskellNone
LanguageHaskell98

System.Process.ListLike

Description

Re-export all symbols and instances of the process-extras package.

Synopsis

Documentation

class Monoid b => ProcessOutput a b | b -> a where Source

Methods

pidf :: ProcessHandle -> b Source

outf :: a -> b Source

errf :: a -> b Source

intf :: SomeException -> b Source

codef :: ExitCode -> b Source

readCreateProcessLazy :: (ProcessOutput a b, ListLikeProcessIO a c) => CreateProcess -> a -> IO b Source

Like readCreateProcess, but the output is read lazily.

readCreateProcessWithExitCode Source

Arguments

:: ListLikeProcessIO a c 
=> CreateProcess

command and arguments to run

-> a

standard input

-> IO (ExitCode, a, a)

exitcode, stdout, stderr

readProcessWithExitCode Source

Arguments

:: ListLikeProcessIO a c 
=> FilePath

command to run

-> [String]

any arguments

-> a

standard input

-> IO (ExitCode, a, a)

exitcode, stdout, stderr

Like readProcessWithExitCode, but with generalized input and output type.

data Chunk a Source

This type is a concrete representation of the methods of class ProcessOutput. If you take your process output as this type you could, for example, echo all the output and then use collectOutput below to convert it to any other instance of ProcessOutput.

Constructors

ProcessHandle ProcessHandle

This will always come first, before any output or exit code.

Stdout a 
Stderr a 
Result ExitCode 
Exception SomeException

Note that the instances below do not use this constructor.

collectOutput :: ProcessOutput a b => [Chunk a] -> b Source

Turn a [Chunk a] into any other instance of ProcessOutput.

showCreateProcessForUser :: CreateProcess -> String Source

System.Process utility functions.