Safe Haskell | None |
---|---|
Language | Haskell2010 |
System.Process.Common
Contents
- class ProcessMaker a where
- class ListLikeIO text char => ListLikeProcessIO text char where
- class (IsString text, Monoid text, ListLike text char) => ProcessText text char
- class Monoid result => ProcessResult text result | result -> text where
- readProcessWithExitCode :: ListLikeProcessIO text char => FilePath -> [String] -> text -> IO (ExitCode, text, text)
- readCreateProcessWithExitCode :: (ProcessMaker maker, ListLikeProcessIO text char) => maker -> text -> IO (ExitCode, text, text)
- readCreateProcessStrict :: (ProcessMaker maker, ProcessResult text result, ListLikeProcessIO text char) => maker -> text -> IO result
- readCreateProcessLazy :: (ProcessMaker maker, ProcessResult a b, ListLikeProcessIO a c) => maker -> a -> IO b
- showCmdSpecForUser :: CmdSpec -> String
- showCreateProcessForUser :: CreateProcess -> String
Documentation
class ProcessMaker a where Source #
Minimal complete definition
Methods
process :: a -> IO (Handle, Handle, Handle, ProcessHandle) Source #
showProcessMakerForUser :: a -> String Source #
Instances
ProcessMaker CreateProcess Source # | This is the usual maker argument to |
ProcessMaker (CreateProcess, BufferMode, BufferMode) Source # | Passing this to |
class ListLikeIO text char => ListLikeProcessIO text char where Source #
Process IO is based on the ListLikeIO
class from the ListLike
package
Minimal complete definition
Methods
forceOutput :: text -> IO text Source #
readChunks :: Handle -> IO [text] Source #
Read from a handle, returning a lazy list of the monoid a.
class Monoid result => ProcessResult text result | result -> text where Source #
Methods
pidf :: ProcessHandle -> result Source #
outf :: text -> result Source #
errf :: text -> result Source #
intf :: SomeException -> result Source #
Instances
ListLikeProcessIO a c => ProcessResult a [Chunk a] Source # | |
ListLikeProcessIO a c => ProcessResult a (ExitCode, [Chunk a]) Source # | |
ListLikeProcessIO text char => ProcessResult text (ExitCode, text, text) Source # | |
readProcessWithExitCode Source #
Arguments
:: ListLikeProcessIO text char | |
=> FilePath | command to run |
-> [String] | any arguments |
-> text | standard input |
-> IO (ExitCode, text, text) | exitcode, stdout, stderr |
Like readProcessWithExitCode
, but with
generalized input and output type. Aside from the usual text-like
types, the output can be a list of Chunk a. This lets you process
the chunks received from stdout and stderr lazil, in the order they
are received, as well as the exit code. Utilities to handle Chunks
are provided in System.Process.ListLike.
readCreateProcessWithExitCode Source #
Arguments
:: (ProcessMaker maker, ListLikeProcessIO text char) | |
=> maker | command and arguments to run |
-> text | standard input |
-> IO (ExitCode, text, text) | exitcode, stdout, stderr |
readCreateProcessStrict :: (ProcessMaker maker, ProcessResult text result, ListLikeProcessIO text char) => maker -> text -> IO result Source #
readCreateProcessLazy :: (ProcessMaker maker, ProcessResult a b, ListLikeProcessIO a c) => maker -> a -> IO b Source #
Like readCreateProcessStrict, but the output is read lazily.
showCmdSpecForUser :: CmdSpec -> String Source #
showCreateProcessForUser :: CreateProcess -> String Source #
System.Process utility functions.