Proposal: overhaul System.Process

John Meacham john at repetae.net
Wed Apr 23 17:25:59 EDT 2008


On Wed, Apr 23, 2008 at 11:29:42AM -0700, Simon Marlow wrote:
> Ok, here's the new proposal.
>
> readProcess
>     :: FilePath                 -- ^ command to run
>     -> [String]                 -- ^ any arguments
>     -> String                   -- ^ standard input
>     -> IO String                -- ^ stdout + stderr
>
> readProcessMayFail
>     :: FilePath                 -- ^ command to run
>     -> [String]                 -- ^ any arguments
>     -> String                   -- ^ standard input
>     -> IO (ExitCode,String)     -- ^ exitcode, and stdout + stderr

MayFail seems to be attached to the wrong one here. 'readProcess' is the
one that might fail, the second actual call always succeeds but returns an
error code. I think readProcessWithExitCode is better.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Libraries mailing list