Safe Haskell | None |
---|---|
Language | Haskell2010 |
System.Process.Common
Contents
Synopsis
- class ProcessMaker a where
- process :: a -> IO (Handle, Handle, Handle, ProcessHandle)
- showProcessMakerForUser :: a -> String
- class ListLikeIO text char => ListLikeProcessIO text char where
- forceOutput :: text -> IO text
- readChunks :: Handle -> IO [text]
- class (IsString text, Monoid text, ListLike text char) => ProcessText text char
- class Monoid result => ProcessResult text result | result -> text where
- pidf :: ProcessHandle -> result
- outf :: text -> result
- errf :: text -> result
- intf :: SomeException -> result
- codef :: ExitCode -> result
- 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 #
Methods
process :: a -> IO (Handle, Handle, Handle, ProcessHandle) #
showProcessMakerForUser :: a -> String #
Instances
ProcessMaker CreateProcess # | This is the usual maker argument to |
Defined in System.Process.Common Methods process :: CreateProcess -> IO (Handle, Handle, Handle, ProcessHandle) # | |
ProcessMaker (CreateProcess, BufferMode, BufferMode) # | Passing this to |
Defined in System.Process.Common Methods process :: (CreateProcess, BufferMode, BufferMode) -> IO (Handle, Handle, Handle, ProcessHandle) # showProcessMakerForUser :: (CreateProcess, BufferMode, BufferMode) -> String # |
class ListLikeIO text char => ListLikeProcessIO text char where #
Process IO is based on the ListLikeIO
class from the ListLike
package
Methods
forceOutput :: text -> IO text #
readChunks :: Handle -> IO [text] #
Read from a handle, returning a lazy list of the monoid a.
Instances
ListLikeProcessIO Chars Char # | Like |
Defined in System.Process.Chars | |
ListLikeProcessIO ByteString Word8 # | Like |
Defined in System.Process.ByteString | |
ListLikeProcessIO ByteString Word8 # | Like |
Defined in System.Process.ByteString.Lazy | |
ListLikeProcessIO Text Char # | Like |
Defined in System.Process.Text | |
ListLikeProcessIO Builder Char # | Like |
Defined in System.Process.Text.Builder | |
ListLikeProcessIO Text Char # | Like |
Defined in System.Process.Text.Lazy | |
ListLikeProcessIO String Char # | Like |
Defined in System.Process.ListLike |
class (IsString text, Monoid text, ListLike text char) => ProcessText text char #
Instances
ProcessText ByteString Word8 # | |
Defined in System.Process.ByteString | |
ProcessText ByteString Word8 # | |
Defined in System.Process.ByteString.Lazy | |
ProcessText Text Char # | |
Defined in System.Process.Text | |
ProcessText Text Char # | |
Defined in System.Process.Text.Lazy | |
ProcessText String Char # | |
Defined in System.Process.ListLike |
class Monoid result => ProcessResult text result | result -> text where #
Instances
ListLikeProcessIO a c => ProcessResult a [Chunk a] # | |
ListLikeProcessIO a c => ProcessResult a (ExitCode, [Chunk a]) # | |
ListLikeProcessIO text char => ProcessResult text (ExitCode, text, text) # | |
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 #
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 #
readCreateProcessLazy :: (ProcessMaker maker, ProcessResult a b, ListLikeProcessIO a c) => maker -> a -> IO b #
Like readCreateProcessStrict, but the output is read lazily.
showCmdSpecForUser :: CmdSpec -> String #
showCreateProcessForUser :: CreateProcess -> String #
System.Process utility functions.