Defines the exit codes that a program can return.
This is a non-blocking version of waitForProcess. If the process is still running, Nothing is returned. If the process has exited, then Just e is returned is the exit code of the process.
readProcessWithExitCode creates an external process, reads its standard output and standard error strictly, waits until the process terminates, and then returns the ExitCode of the process, the standard output, and the standard error.
readProcess and readProcessWithExitCode are fairly simple wrappers around createProcess. Constructing variants of these functions is quite easy: follow the link to the source code to see how readProcess is implemented.