h*B?      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz0.2.12.0 Safe-Inferred){|}~ Safe-Inferred%&179$d*  typed-processWrapper for when an exception is thrown when reading from a child process, used by H.  typed-processException thrown by 5 in the event of a non-success exit code. Note that - is called by other functions as well, like  or .*Note that several functions that throw an   intentionally do not populate  or . This prevents unbounded memory usage for large stdout and stderrs.Functions which do include  or  (like ") state so in their documentation. typed-processInternal type, to make for easier composition of cleanup actions. typed-processA specification for how to create one of the three standard child streams, stdin, stdout and stderr. A ! can be thought of as containing A type safe version of  from System.Process. This determines whether the stream should be inherited from the parent process, piped to or from a , etc.3A means of accessing the stream as a value of type aA cleanup action which will be run on the stream once the process terminates To create a  StreamSpec see the section  #streamspecs Stream specs. typed-processWhether a stream is an input stream or output stream. Note that this is from the perspective of the  child process1, so that a child's standard input stream is an STInput8, even though the parent process will be writing to it. typed-processAn abstract configuration for a process, which can then be launched into an actual running Process. Takes three type parameters, providing the types of standard input, standard output, and standard error, respectively.7There are three ways to construct a value of this type: With the , smart constructor, which takes a command name and a list of arguments. With the .. smart constructor, which takes a shell string With the  instance via OverloadedStrings. If you provide it a string with no spaces (e.g., "date"?), it will treat it as a raw command with no arguments (e.g., proc "date" []!). If it has spaces, it will use shell.In all cases, the default for all three streams is to inherit the streams from the parent process. For other settings, see the  #processconfigsetters setters below for default values.Once you have a  ProcessConfig you can launch a process from it using the functions in the section  #launchaprocessLaunch a process.+ typed-processInternal helper, typed-process Create a & from the given command and arguments.- typed-processInternal helper. typed-process Create a  from the given shell command./ typed-processInternal helper0 typed-process3Set the child's standard input stream to the given . Default: D1 typed-process4Set the child's standard output stream to the given . Default: D2 typed-process3Set the child's standard error stream to the given . Default: D3 typed-process/Set the working directory of the child process.-Default: current process's working directory.4 typed-process6Inherit the working directory from the parent process.5 typed-process3Set the environment variables of the child process.'Default: current process's environment.6 typed-process:Inherit the environment variables from the parent process.7 typed-processShould we close all file descriptors besides stdin, stdout, and stderr? See  for more information.Default: False8 typed-process%Should we create a new process group?Default: False9 typed-processDelegate handling of Ctrl-C to the child. For more information, see .Default: False: typed-processDetach console on Windows, see .Default: False; typed-process#Create new console on Windows, see .Default: False< typed-process!Set a new session with the POSIX setsid* syscall, does nothing on non-POSIX. See .Default: False= typed-process0Set the child process's group ID with the POSIX setgid* syscall, does nothing on non-POSIX. See .Default: False> typed-process*Inherit the group from the parent process.? typed-process/Set the child process's user ID with the POSIX setuid* syscall, does nothing on non-POSIX. See .Default: False@ typed-process)Inherit the user from the parent process.A typed-process Create a new  from the given ' and a helper function. This function:Takes as input the raw  Maybe Handle returned by the  function. The handle will be Just  if the  argument is  and Nothing otherwise. See  for more details. Returns the actual stream value a8, as well as a cleanup function to be run when calling  stopProcess. If making a  with  , prefer B&, which encodes the invariant that a  is created.B  typed-process Create a new  ) from the given function. This function:Takes as input the Handle returned by the  function. See  for more details. Returns the actual stream value a8, as well as a cleanup function to be run when calling  stopProcess.C typed-process Create a new ! from a function that accepts a  and a helper function. This function is the same as the helper in AD typed-processA stream spec which simply inherits the stream of the parent process.E typed-processA stream spec which is empty when used for for input and discards output. Note this requires your platform's null device to be available when the process is started.F typed-processA stream spec which will close the stream for the child process. You usually do not want to use this, as it will leave the corresponding file descriptor unassigned and hence available for re-use in the child process. Prefer E/ unless you're certain you want this behavior.G typed-process8An input stream spec which sets the input to the given . A separate thread will be forked to write the contents to the child process.H typed-process%Capture the output of a process in a .This function will fork a separate thread to consume all input from the process, and will only make the results available when the underlying & is closed. As this is provided as an  action, you can either check if the result is available, or block until it's ready.?In the event of any exception occurring when reading from the , the  action will throw a  .I typed-process'Helper function (not exposed) for both H and withProcessInterleave6. This will consume all of the output from the given ; in a separate thread and provide access to the resulting 6 via STM. Second action will close the reader handle.J typed-processCreate a new pipe between this process and the child, and return a  to communicate with the child.K typed-processUse the provided 8 for the child process, and when the process exits, do not close it. This is useful if, for example, you want to have multiple processes write to the same log file sequentially.L typed-processUse the provided  for the child process, and when the process exits, close it. If you have no reason to keep the ! open, you should use this over K.O typed-process"The name of the system null deviceQ typed-processThis instance uses G to convert a raw string into a stream of input for a child process.0 typed-process typed-process1 typed-process typed-process2 typed-process typed-process3 typed-process typed-process4 typed-process5 typed-process typed-process6 typed-process7 typed-process typed-process8 typed-process typed-process9 typed-process typed-process: typed-process typed-process; typed-process typed-process< typed-process typed-process= typed-process typed-process> typed-process? typed-process typed-process@ typed-processA typed-process typed-processB typed-process typed-processC typed-process typed-processI typed-process reader handle  *)('&%$#"! +,-./0123456789:;<=>?@ABCDEFGHIJKLMNO*)('&%$#"! +,-./0123456789:;<=>?@ABCDEFGHIJKL  MNONone %&179?7"Z typed-processA running process. The three type parameters provide the type of the standard input, standard output, and standard error streams.To interact with a Process% use the functions from the section  #interactwithaprocessInteract with a process.[ typed-process$Launch a process based on the given #. You should ensure that you call \ on the result. It's usually better to use one of the functions in this module which ensures \ is called, such as ^.\ typed-processClose a process and release any resources acquired. This will ensure  is called, wait for the process to actually exit, and then close out resources allocated for the streams. In the event of any cleanup exceptions being thrown this will throw an exception.] typed-process!Uses the bracket pattern to call [ and ensures that \ is called.This function is usually not0 what you want. You're likely better off using ^. See  /https://github.com/fpco/typed-process/issues/25.^ typed-process!Uses the bracket pattern to call [ . Unlike ], this function will wait for the child process to exit, and only kill it with \; in the event that the inner function throws an exception.To interact with a Process% use the functions from the section  #interactwithaprocessInteract with a process._ typed-processDeprecated synonym for ].` typed-processSame as ], but also calls qTo interact with a Process% use the functions from the section  #interactwithaprocessInteract with a process.a typed-processSame as ^, but also calls qb typed-processDeprecated synonym for `.c typed-process;Run a process, capture its standard output and error as a , wait for it to complete, and then return its exit code, output, and error.Note that any previously used 1 or 2 will be overridden.d typed-processSame as c, but instead of returning the , checks it with q.Exceptions thrown by this function will include stdout and stderr.e typed-processSame as c, but only read the stdout of the process. Original settings for stderr remain.f typed-processSame as e , but instead of returning the , checks it with q.7Exceptions thrown by this function will include stdout.g typed-processSame as c, but only read the stderr of the process. Original settings for stdout remain.h typed-processSame as g , but instead of returning the , checks it with q.7Exceptions thrown by this function will include stderr.i typed-processSame as c%, but interleaves stderr with stdout.Motivation: Use this function if you need stdout interleaved with stderr output (e.g. from an HTTP server) in order to debug failures.j typed-processSame as i, but instead of returning the , checks it with q.7Exceptions thrown by this function will include stdout.k typed-process=Run the given process, wait for it to exit, and returns its .l typed-processSame as k , but instead of returning the , checks it with q.m typed-process1Wait for the process to exit and then return its .n typed-processSame as m , but in .o typed-process5Check if a process has exited and, if so, return its .p typed-processSame as o , but in .q typed-processWait for a process to exit, and ensure that it exited successfully. If not, throws an  .Exceptions thrown by this function will not include stdout or stderr (This prevents unbounded memory usage from reading them into memory). However, some callers such as d= catch the exception, add the stdout and stderr, and rethrow.r typed-processSame as q , but in .s  typed-process-Returns the PID (process ID) of a subprocess. is returned if the underlying  was already closed. Otherwise a PID is returned that remains valid as long as the handle is open. The operating system may reuse the PID as soon as the last handle to the process is closed. typed-processInternalt typed-process,Get the child's standard input stream value.u typed-process-Get the child's standard output stream value.v typed-process,Get the child's standard error stream value.  typed-processGet a process's configuration. This is useful for constructing  s.Note that the stdin, stdout, and stderr streams are stored in the Z , not the , so the returned : will always have empty stdin, stdout, and stderr values.w typed-processTake   out of the Z. This method is needed in cases one need to use low level functions from the process( package. Use cases for this method are: %Send a special signal to the process.Terminate the process group instead of terminating single process.4Use platform specific API on the underlying process.This method is considered unsafe because the actions it performs on the underlying process may overlap with the functionality that  typed-process1 provides. For example the user should not call  " on the process handle as either   or \ will lock. Additionally, even if process was terminated by the   or by sending signal, \ should be called either way in order to cleanup resources allocated by the  typed-process.x  typed-processGet an  1 containing the process's stdout and stderr data.Note that this will call m to block until the process exits, if it has not exited already.Unlike q" and similar, this will return an  ! even if the process exits with .y  typed-processGet an   containing no data other than the exit code and process config.Unlike q" and similar, this will return an  ! even if the process exits with .[ typed-process] typed-process typed-process^ typed-process typed-process` typed-process typed-processa typed-process typed-processc typed-processd typed-processe typed-processf typed-processg typed-processh typed-process typed-process typed-processi typed-processj typed-process typed-processk typed-process typed-processl typed-processZ,.0123456789:;<=>?@DEFGHJKLABkcegi^][\ldfhja`mnopqrstuv xy w_bZ,.0123456789:;<=>?@DEFGHJKLABkcegi^][\ldfhja`mnopqrstuv xy w_b    !!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     -typed-process-0.2.12.0-7xJl5LEc11KLf9TcWesLMgSystem.Process.TypedSystem.Process.Typed.Internal typed-processPaths_typed_process checkExitCode runProcess_ readProcess_System.Process ProcessHandlewaitForProcessterminateProcessbaseGHC.IO.ExceptionExitCode ExitSuccess ExitFailureprocess-1.6.17.0System.Process.Common StdStreamInherit UseHandle CreatePipeNoStreamPidByteStringOutputExceptionExitCodeException eceExitCodeeceProcessConfig eceStdout eceStderrCleanup runCleanup StreamSpecssStreamssCreate StreamTypeSTInputSTOutput ProcessConfig pcCmdSpecpcStdinpcStdoutpcStderr pcWorkingDirpcEnv pcCloseFds pcCreateGrouppcDelegateCtlcpcDetachConsolepcCreateNewConsole pcNewSession pcChildGroup pcChildUserdefaultProcessConfigprocsetProcshellsetShellsetStdin setStdout setStderr setWorkingDirsetWorkingDirInheritsetEnv setEnvInherit setCloseFdssetCreateGroupsetDelegateCtlcsetDetachConsolesetCreateNewConsole setNewSession setChildGroupsetChildGroupInherit setChildUsersetChildUserInherit mkStreamSpecmkPipeStreamSpecmkManagedStreamSpecinherit nullStreamclosedbyteStringInputbyteStringOutputbyteStringFromHandle createPipe useHandleOpenuseHandleClosebracketfinally nullDevice$fApplicativeCleanup$fIsStringStreamSpec$fIsStringProcessConfig$fShowProcessConfig$fShowExitCodeException$fExceptionExitCodeException$$fExceptionByteStringOutputException$fShowByteStringOutputException$fFunctorStreamSpec$fFunctorCleanupProcess startProcess stopProcesswithProcessTermwithProcessWait withProcesswithProcessTerm_withProcessWait_ withProcess_ readProcessreadProcessStdoutreadProcessStdout_readProcessStderrreadProcessStderr_readProcessInterleavedreadProcessInterleaved_ runProcess waitExitCodewaitExitCodeSTM getExitCodegetExitCodeSTMcheckExitCodeSTMgetPidgetStdin getStdout getStderrunsafeProcessHandleexitCodeExceptionWithOutputexitCodeExceptionNoOutput $fShowProcessversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDirgetDataFileName getSysconfDirGHC.IO.Handle.TypesHandle Data.StringIsString close_fds delegate_ctlcdetach_consolecreate_new_console new_session child_group child_user createProcessbytestring-0.11.5.2Data.ByteString.Lazy.Internal ByteString GHC.Conc.SyncSTM GHC.MaybeNothing clearStreamsgetProcessConfigwithProcessInterleave