-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Process extras
--   
--   Extra functionality for the Process library
--   <a>http://hackage.haskell.org/package/process</a>.
@package process-extras
@version 0.3.3.5

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

-- | Read from a handle, returning a lazy list of the monoid 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 <a>readProcessWithExitCode</a>, 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 GHC.Generics.Constructor System.Process.Common.C1_1ExitCode
instance GHC.Generics.Constructor System.Process.Common.C1_0ExitCode
instance GHC.Generics.Datatype System.Process.Common.D1ExitCode
instance GHC.Generics.Generic GHC.IO.Exception.ExitCode
instance Control.DeepSeq.NFData GHC.IO.Exception.ExitCode
instance System.Process.Common.ProcessMaker System.Process.Internals.CreateProcess
instance System.Process.Common.ProcessMaker (System.Process.Internals.CreateProcess, GHC.IO.Handle.Types.BufferMode, GHC.IO.Handle.Types.BufferMode)
instance System.Process.Common.ListLikeProcessIO a c => System.Process.Common.ProcessOutput a (GHC.IO.Exception.ExitCode, a, a)
instance GHC.Base.Monoid GHC.IO.Exception.ExitCode

module System.Process.ByteString.Lazy

-- | Like <a>readProcessWithExitCode</a>, but using <a>ByteString</a>

-- | Specialized version for backwards compatibility.
readProcessWithExitCode :: FilePath -> [String] -> ByteString -> IO (ExitCode, ByteString, ByteString)
readCreateProcessWithExitCode :: CreateProcess -> ByteString -> IO (ExitCode, ByteString, ByteString)
instance System.Process.Common.ListLikeProcessIO Data.ByteString.Lazy.Internal.ByteString GHC.Word.Word8

module System.Process.Text

-- | Like <a>readProcessWithExitCode</a>, but using <a>Text</a>

-- | Specialized version for backwards compatibility.
readProcessWithExitCode :: FilePath -> [String] -> Text -> IO (ExitCode, Text, Text)
readCreateProcessWithExitCode :: CreateProcess -> Text -> IO (ExitCode, Text, Text)
instance System.Process.Common.ListLikeProcessIO Data.Text.Internal.Text GHC.Types.Char

module System.Process.Text.Lazy

-- | Like <a>readProcessWithExitCode</a>, but using <a>Text</a>

-- | Specialized version for backwards compatibility.
readProcessWithExitCode :: FilePath -> [String] -> Text -> IO (ExitCode, Text, Text)
readCreateProcessWithExitCode :: CreateProcess -> Text -> IO (ExitCode, Text, Text)
instance System.Process.Common.ListLikeProcessIO Data.Text.Internal.Lazy.Text GHC.Types.Char

module System.Process.ByteString

-- | Like <a>readProcessWithExitCode</a>, but using <a>ByteString</a>

-- | Specialized version for backwards compatibility.
readProcessWithExitCode :: FilePath -> [String] -> ByteString -> IO (ExitCode, ByteString, ByteString)
readCreateProcessWithExitCode :: CreateProcess -> ByteString -> IO (ExitCode, ByteString, ByteString)
instance System.Process.Common.ListLikeProcessIO Data.ByteString.Internal.ByteString GHC.Word.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 <a>readProcessWithExitCode</a>, 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 <tt>[Chunk a]</tt> into any other instance of
--   <a>ProcessOutput</a>.
collectOutput :: ProcessOutput a b => [Chunk a] -> b

-- | System.Process utility functions.
showCreateProcessForUser :: CreateProcess -> String
showCmdSpecForUser :: CmdSpec -> String
instance System.Process.Common.ListLikeProcessIO GHC.Base.String GHC.Types.Char
instance System.Process.Common.ListLikeProcessIO a c => System.Process.Common.ProcessOutput a [System.Process.ListLike.Chunk a]
instance System.Process.Common.ListLikeProcessIO a c => System.Process.Common.ProcessOutput a (GHC.IO.Exception.ExitCode, [System.Process.ListLike.Chunk a])
