Proposal: overhaul System.Process
duncan.coutts at worc.ox.ac.uk
Tue Apr 22 19:08:43 EDT 2008
On Tue, 2008-04-22 at 15:52 -0700, Don Stewart wrote:
> > > > I would have thought (ExitCode,String) was more appropriate.
> > >
> > > Yes, definitely.
> > Yes, I mentioned this to Don previously when he published his popen
> > code. I think he agreed.
> I'd changed, but not pushed out, process-light:
> readProcess :: FilePath -- ^ command to run
> -> [String] -- ^ any arguments
> -> String -- ^ standard input
> -> IO (Either (ExitCode,String) String) -- ^ either the stdout, or an exitcode and any output
You don't need the Either. ExitCode already covers the case when the
process terminates successfully.
More information about the Libraries