[darcs-devel] darcs patch: Use System.Process on Windows (and 3 more)

David Roundy droundy at darcs.net
Tue Dec 26 05:24:23 PST 2006


On Mon, Dec 25, 2006 at 11:46:36PM +0100, Eric Kow wrote:
> These patches make Simon Marlow's runProcess stuff compile under GHC
> 6.4.2.  Note that I haven't tested them very thoroughly.  Just did a
> darcs record with long comments using both a 6.4.2 and 6.6 build.  This
> doesn't tell us very much, except that darcs finds notepad.

Looks reasonable to me--although I mostly reviewed your new code and the
use of bracketOnError, which surprised me by calling unblock--I wish there
were clearer semantics for deciding when to unblock and when not to
unblock.  Usually I'd rather have a stack of blocks, which isn't what ghc
gives us (so that if block was called twice, unblock would be needed twice
to return to the original condition, so that (block . unblock) would be
(effectively) an identity function.  At least for this bracketOnError,
that's the semantics we'd like.  We could slightly work around this by
manually blocking signals rather than just using block to avoid them.

But in this instance, it doesn't matter, as we never should call exec in a
corruption-critical bit of code.  (I.e. calling it while we're updating the
repository would itself be a bug.)

> Also, I would now welcome a patch for the Unix stuff which also uses
> System.runProcess.  The new Debian with ghc 6.6 is coming shortly.
> Besides, we might as well ditch 6.2.2 support for Unix now that we're
> doing the same for Windows.  I guess this would mean our basic criteria
> for deciding what GHC to support would be the more conservative of:
> - what the latest released Debian supports (6.6)
> - the second-to-last major GHC release (6.4.x in this case) 

Yes, this sounds like a reasonable plan, with the latter criterion perhaps
being negotiable, if ghc slows down its releases.
-- 
David Roundy
http://www.darcs.net


More information about the darcs-devel mailing list