On 23/04/2008, <b class="gmail_sendername">John Meacham</b> <<a href="mailto:john@repetae.net">john@repetae.net</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, Apr 23, 2008 at 11:29:42AM -0700, Simon Marlow wrote:<br> <br>> Ok, here's the new proposal.<br> ><br> > readProcess<br> > :: FilePath -- ^ command to run<br> > -> [String] -- ^ any arguments<br>
> -> String -- ^ standard input<br> > -> IO String -- ^ stdout + stderr<br> ><br> > readProcessMayFail<br> > :: FilePath -- ^ command to run<br>
> -> [String] -- ^ any arguments<br> > -> String -- ^ standard input<br> > -> IO (ExitCode,String) -- ^ exitcode, and stdout + stderr<br> <br> <br>MayFail seems to be attached to the wrong one here. 'readProcess' is the<br>
one that might fail, the second actual call always succeeds but returns an<br> error code. I think readProcessWithExitCode is better.</blockquote><div><br>yes, well the idea was that you would use readProcessMayFail when you are anticipating that the process might fail. Still, I like your suggestion of readProcessWithExitCode better, so I'll go with that.<br>
<br>Cheers,<br>Simon<br> </div><br></div>