-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Process extras -- @package process-extras @version 0.3.3.2 module System.Process.Common class ProcessMaker a process :: ProcessMaker a => a -> IO (Handle, Handle, Handle, ProcessHandle) class ListLikeIO a c => ListLikeProcessIO a c forceOutput :: ListLikeProcessIO a c => a -> IO a readChunks :: ListLikeProcessIO a c => Handle -> IO [a] class Monoid b => ProcessOutput a b | b -> a pidf :: ProcessOutput a b => ProcessHandle -> b outf :: ProcessOutput a b => a -> b errf :: ProcessOutput a b => a -> b intf :: ProcessOutput a b => SomeException -> b codef :: ProcessOutput a b => ExitCode -> b -- | Like readProcessWithExitCode, but with generalized input and -- output type. readProcessWithExitCode :: ListLikeProcessIO a c => FilePath -> [String] -> a -> IO (ExitCode, a, a) readCreateProcessWithExitCode :: (ProcessMaker maker, ListLikeProcessIO a c) => maker -> a -> IO (ExitCode, a, a) readCreateProcess :: (ProcessMaker maker, ProcessOutput a b, ListLikeProcessIO a c) => maker -> a -> IO b -- | Like readCreateProcess, but the output is read lazily. readCreateProcessLazy :: (ProcessMaker maker, ProcessOutput a b, ListLikeProcessIO a c) => maker -> a -> IO b instance Monoid ExitCode instance ListLikeProcessIO a c => ProcessOutput a (ExitCode, a, a) instance ProcessMaker (CreateProcess, BufferMode, BufferMode) instance ProcessMaker CreateProcess instance NFData ExitCode module System.Process.ByteString.Lazy -- | Like readProcessWithExitCode, but using ByteString -- | Specialized version for backwards compatibility. readProcessWithExitCode :: FilePath -> [String] -> ByteString -> IO (ExitCode, ByteString, ByteString) readCreateProcessWithExitCode :: CreateProcess -> ByteString -> IO (ExitCode, ByteString, ByteString) instance ListLikeProcessIO ByteString Word8 module System.Process.Text -- | Like readProcessWithExitCode, but using Text -- | Specialized version for backwards compatibility. readProcessWithExitCode :: FilePath -> [String] -> Text -> IO (ExitCode, Text, Text) readCreateProcessWithExitCode :: CreateProcess -> Text -> IO (ExitCode, Text, Text) instance ListLikeProcessIO Text Char module System.Process.Text.Lazy -- | Like readProcessWithExitCode, but using Text -- | Specialized version for backwards compatibility. readProcessWithExitCode :: FilePath -> [String] -> Text -> IO (ExitCode, Text, Text) readCreateProcessWithExitCode :: CreateProcess -> Text -> IO (ExitCode, Text, Text) instance ListLikeProcessIO Text Char module System.Process.ByteString -- | Like readProcessWithExitCode, but using ByteString -- | Specialized version for backwards compatibility. readProcessWithExitCode :: FilePath -> [String] -> ByteString -> IO (ExitCode, ByteString, ByteString) readCreateProcessWithExitCode :: CreateProcess -> ByteString -> IO (ExitCode, ByteString, ByteString) instance ListLikeProcessIO ByteString Word8 -- | Re-export all symbols and instances of the process-extras package. -- Adds the Chunk type with a ProcessOutput instance, and a collectOutput -- function to turn a list of chunks into any instance of ProcessOutput, -- such as (ExitCode, String, String). This means you can have -- readCreateProcess output a list of Chunk, operate on it to do progress -- reporting, and finally convert it to the type that -- readProcessWithExitCode woud have returned. module System.Process.ListLike class ProcessMaker a process :: ProcessMaker a => a -> IO (Handle, Handle, Handle, ProcessHandle) class ListLikeIO a c => ListLikeProcessIO a c forceOutput :: ListLikeProcessIO a c => a -> IO a class Monoid b => ProcessOutput a b | b -> a pidf :: ProcessOutput a b => ProcessHandle -> b outf :: ProcessOutput a b => a -> b errf :: ProcessOutput a b => a -> b intf :: ProcessOutput a b => SomeException -> b codef :: ProcessOutput a b => ExitCode -> b readCreateProcess :: (ProcessMaker maker, ProcessOutput a b, ListLikeProcessIO a c) => maker -> a -> IO b -- | Like readCreateProcess, but the output is read lazily. readCreateProcessLazy :: (ProcessMaker maker, ProcessOutput a b, ListLikeProcessIO a c) => maker -> a -> IO b readCreateProcessWithExitCode :: (ProcessMaker maker, ListLikeProcessIO a c) => maker -> a -> IO (ExitCode, a, a) -- | Like readProcessWithExitCode, but with generalized input and -- output type. readProcessWithExitCode :: ListLikeProcessIO a c => FilePath -> [String] -> a -> IO (ExitCode, a, a) -- | 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. data Chunk a -- | This will always come first, before any output or exit code. ProcessHandle :: ProcessHandle -> Chunk a Stdout :: a -> Chunk a Stderr :: a -> Chunk a Result :: ExitCode -> Chunk a -- | Note that the instances below do not use this constructor. Exception :: SomeException -> Chunk a -- | Turn a [Chunk a] into any other instance of -- ProcessOutput. collectOutput :: ProcessOutput a b => [Chunk a] -> b -- | System.Process utility functions. showCreateProcessForUser :: CreateProcess -> String showCmdSpecForUser :: CmdSpec -> String instance ListLikeProcessIO a c => ProcessOutput a (ExitCode, [Chunk a]) instance ListLikeProcessIO a c => ProcessOutput a [Chunk a] instance ListLikeProcessIO String Char