Safe Haskell | None |
---|---|
Language | Haskell98 |
Re-export all symbols and instances of the process-extras package.
- class ListLikeIO a c => ListLikeProcessIO a c where
- forceOutput :: a -> IO a
- class Monoid b => ProcessOutput a b | b -> a where
- pidf :: ProcessHandle -> b
- outf :: a -> b
- errf :: a -> b
- intf :: SomeException -> b
- codef :: ExitCode -> b
- readCreateProcess :: (ProcessOutput a b, ListLikeProcessIO a c) => CreateProcess -> a -> IO b
- readCreateProcessLazy :: (ProcessOutput a b, ListLikeProcessIO a c) => CreateProcess -> a -> IO b
- readCreateProcessWithExitCode :: ListLikeProcessIO a c => CreateProcess -> a -> IO (ExitCode, a, a)
- readProcessWithExitCode :: ListLikeProcessIO a c => FilePath -> [String] -> a -> IO (ExitCode, a, a)
- data Chunk a
- collectOutput :: ProcessOutput a b => [Chunk a] -> b
- showCreateProcessForUser :: CreateProcess -> String
- showCmdSpecForUser :: CmdSpec -> String
Documentation
class ListLikeIO a c => ListLikeProcessIO a c where Source
forceOutput :: a -> IO a Source
ListLikeProcessIO String Char | Like |
ListLikeProcessIO ByteString Word8 | Like |
ListLikeProcessIO ByteString Word8 | Like |
ListLikeProcessIO Text Char | Like |
ListLikeProcessIO Text Char | Like |
class Monoid b => ProcessOutput a b | b -> a where Source
pidf :: ProcessHandle -> b Source
intf :: SomeException -> b Source
ListLikeProcessIO a c => ProcessOutput a [Chunk a] | |
ListLikeProcessIO a c => ProcessOutput a (ExitCode, [Chunk a]) | |
ListLikeProcessIO a c => ProcessOutput a (ExitCode, a, a) |
readCreateProcess :: (ProcessOutput a b, ListLikeProcessIO a c) => CreateProcess -> a -> IO b Source
readCreateProcessLazy :: (ProcessOutput a b, ListLikeProcessIO a c) => CreateProcess -> a -> IO b Source
Like readCreateProcess, but the output is read lazily.
readCreateProcessWithExitCode Source
:: ListLikeProcessIO a c | |
=> CreateProcess | command and arguments to run |
-> a | standard input |
-> IO (ExitCode, a, a) | exitcode, stdout, stderr |
readProcessWithExitCode Source
:: 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.
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.
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. |
ListLikeProcessIO a c => ProcessOutput a [Chunk a] | |
ListLikeProcessIO a c => ProcessOutput a (ExitCode, [Chunk a]) |
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.