Proposal: overhaul System.Process

David Roundy droundy at darcs.net
Tue Apr 29 13:48:41 EDT 2008


On Tue, Apr 29, 2008 at 10:14:44AM -0700, Simon Marlow wrote:
> David Roundy wrote:
> 
> >Why not then leave the stderr out of the output, and just print it to
> >stderr? It's the standard location to send error output, and I'd hate to
> >lose it.
> 
> Ok, so here's the new proposal:
> 
> readProcess
>     :: FilePath                 -- ^ command to run
>     -> [String]                 -- ^ any arguments
>     -> String                   -- ^ standard input
>     -> IO String                -- ^ stdout only (stderr is inherited)
> 
> readProcessWithExitCode
>     :: FilePath                 -- ^ command to run
>     -> [String]                 -- ^ any arguments
>     -> String                   -- ^ standard input
>     -> IO (ExitCode,String)     -- ^ exitcode, and stdout + stderr

Looks good to me! I imagine (hope?) readProcess will see more use than
readProcessWithExitCode, since it's simpler and easier to use.
-- 
David Roundy
Department of Physics
Oregon State University


More information about the Libraries mailing list