On 23/04/2008, <b class="gmail_sendername">John Meacham</b> &lt;<a href="mailto:john@repetae.net">john@repetae.net</a>&gt; 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>&gt; Ok, here&#39;s the new proposal.<br> &gt;<br> &gt; readProcess<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; :: FilePath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- ^ command to run<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; [String]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- ^ any arguments<br>
 &gt;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- ^ standard input<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; IO String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- ^ stdout + stderr<br> &gt;<br> &gt; readProcessMayFail<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; :: FilePath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- ^ command to run<br>
 &gt;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; [String]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- ^ any arguments<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- ^ standard input<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; IO (ExitCode,String)&nbsp;&nbsp;&nbsp;&nbsp; -- ^ exitcode, and stdout + stderr<br> <br> <br>MayFail seems to be attached to the wrong one here. &#39;readProcess&#39; 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.&nbsp; Still, I like your suggestion of readProcessWithExitCode better, so I&#39;ll go with that.<br>
<br>Cheers,<br>Simon<br>&nbsp;</div><br></div>