Hi Reinier,

Would you mind looking at this one? 

I imagine most of the work is in thinking about the patch comment :-),
but I'm not very experienced in thinking about laziness.  Are you?

> Wed May 27 15:18:20 CEST 2009  Petr Rockai <[email protected]>
>   * Resolve issue1229: strictify checkPristineAgainstSlurpy.
>   
>   The code in replayRepository' in Darcs.Repository.Repair relies on being 
> able
>   to catch exceptions that arise while running checkPristineAgainstSlurpy.
>   Unfortunately, due to unsafeInterleaveIO used in the SlurpDirectory code, 
> the
>   exception does not get thrown until after the `catchall` is out of scope,
>   ie. when the "is_same" condition is evaluated (a supposed pure value, but
>   unsafeInterleaveIO has introduced latent exceptions into the equation). 
> Making
>   the return from checkPristineAgainstSlurpy strict (using $!) forces 
> execution
>   of the interleaved IO and trips the exception in the right context.

Resolve issue1229: strictify checkPristineAgainstSlurpy.
--------------------------------------------------------
>  checkPristineAgainstSlurpy repository@(Repo _ opts _ _) s2 =
>      do s1 <- slurp_recorded repository
>         ftf <- filetype_function
> -       return $ nullFL $ unsafeDiff (LookForAdds:IgnoreTimes:opts) ftf s1 s2
> +       return $! nullFL $ unsafeDiff (LookForAdds:IgnoreTimes:opts) ftf s1 s2

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to