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


-- | Conduits for processes
--   
--   Conduits for processes. For more details:
--   <a>https://github.com/tanakh/process-conduit/blob/master/README.md</a>
@package process-conduit
@version 1.0.0.0

module Data.Conduit.Process

-- | Source of process
sourceProcess :: MonadResource m => CreateProcess -> Producer m ByteString

-- | Conduit of process
conduitProcess :: MonadResource m => CreateProcess -> Conduit ByteString m ByteString

-- | Source of shell command
sourceCmd :: MonadResource m => String -> Producer m ByteString

-- | Conduit of shell command
conduitCmd :: MonadResource m => String -> Conduit ByteString m ByteString

-- | Construct a <a>CreateProcess</a> record for passing to
--   <a>createProcess</a>, representing a command to be passed to the
--   shell.
shell :: String -> CreateProcess

-- | Construct a <a>CreateProcess</a> record for passing to
--   <a>createProcess</a>, representing a raw command with arguments.
--   
--   The <tt>FilePath</tt> names the executable, and is interpreted
--   according to the platform's standard policy for searching for
--   executables. Specifically:
--   
--   <ul>
--   <li>on Unix systems the <tt>execvp</tt> semantics is used, where if
--   the filename does not contain a slash (<tt>/</tt>) then the
--   <tt>PATH</tt> environment variable is searched for the
--   executable.</li>
--   <li>on Windows systems the Win32 <tt>CreateProcess</tt> semantics is
--   used. Briefly: if the filename does not contain a path, then the
--   directory containing the parent executable is searched, followed by
--   the current directory, then some some standard locations, and finally
--   the current <tt>PATH</tt>. An <tt>.exe</tt> extension is added if the
--   filename does not already have an extension. For full details see the
--   documentation for the Windows <tt>SearchPath</tt> API.</li>
--   </ul>
proc :: FilePath -> [String] -> CreateProcess
data CreateProcess :: *
CreateProcess :: CmdSpec -> Maybe FilePath -> Maybe [(String, String)] -> StdStream -> StdStream -> StdStream -> Bool -> Bool -> CreateProcess

-- | Executable &amp; arguments, or shell command
cmdspec :: CreateProcess -> CmdSpec

-- | Optional path to the working directory for the new process
cwd :: CreateProcess -> Maybe FilePath

-- | Optional environment (otherwise inherit from the current process)
env :: CreateProcess -> Maybe [(String, String)]

-- | How to determine stdin
std_in :: CreateProcess -> StdStream

-- | How to determine stdout
std_out :: CreateProcess -> StdStream

-- | How to determine stderr
std_err :: CreateProcess -> StdStream

-- | Close all file descriptors except stdin, stdout and stderr in the new
--   process (on Windows, only works if std_in, std_out, and std_err are
--   all Inherit)
close_fds :: CreateProcess -> Bool

-- | Create a new process group
create_group :: CreateProcess -> Bool
data CmdSpec :: *

-- | a command line to execute using the shell
ShellCommand :: String -> CmdSpec

-- | the filename of an executable with a list of arguments. see
--   <a>proc</a> for the precise interpretation of the <tt>FilePath</tt>
--   field.
RawCommand :: FilePath -> [String] -> CmdSpec
data StdStream :: *

-- | Inherit Handle from parent
Inherit :: StdStream

-- | Use the supplied Handle
UseHandle :: Handle -> StdStream

-- | Create a new pipe. The returned <tt>Handle</tt> will use the default
--   encoding and newline translation mode (just like <tt>Handle</tt>s
--   created by <tt>openFile</tt>).
CreatePipe :: StdStream
data ProcessHandle :: *

module System.Process.QQ

-- | Command result of (Lazy) ByteString.
cmd :: QuasiQuoter

-- | Source of shell command
scmd :: QuasiQuoter

-- | Conduit of shell command
ccmd :: QuasiQuoter
