[darcs-users] darcs patch: resolve issue784: fix file handle leak and check for exceptions on process running.

Jason Dagit dagit at codersbase.com
Mon Oct 20 06:53:09 UTC 2008


On Sun, Oct 19, 2008 at 11:51 PM, Salvatore Insalaco <kirby81 at gmail.com>wrote:

> 2008/10/20 Jason Dagit <dagit at codersbase.com>:
> > So it looks like you made this changes:
> > +ortryrunning :: IO ExitCode -> IO ExitCode -> IO ExitCode
> > +a `ortryrunning` b = do ret <- try a
> > +                        case ret of
> > +                          (Right ExitSuccess) -> return ExitSuccess
> > +                          _ -> b
> >
> > Just checking that I understand, this could also be:
> > a `ortryrunning` b = try a >>= either (const b) return
>
> Unfortunately that's not the same. We should return ExitSuccess only
> when we got the ExitSuccess return code, not on any return code that
> is not an exception.


Thanks for the clarification.  Your changes make even more sense.

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osuosl.org/pipermail/darcs-users/attachments/20081019/dd417570/attachment.htm 


More information about the darcs-users mailing list