Reinier Lamers <[email protected]> writes:
> It might be a good idea to add a comment to checkPristineAgainstSlurpy that
> it may throw exceptions, and that explains the strictification. A patch
> adding such comment is attached.
Thanks.

> Writing this comment prompted me to wonder why darcs runs code that throws
> exceptions inside unsafeInterleaveIO. That's asking for trouble. I think the
> real solution would be to move the catch inside the unsafeInterleaveIO and
> have the unsafeInterleaveIO'd function return a Maybe or Either.
Well, this is sort of "by design" in the SlurpDirectory code. Simply removing
the interleaving would likely lead to all sorts of performance and memory
issues. Wrapping things up probably wouldn't work very well either.

Anyhow, the in the grand scheme of things, I will eventually remove
SlurpDirectory altogether, which will take most of the IO interleaving with it
as well. (This also means Darcs.Diff and lots of other code that depends on
slurping -- so that's still a whole lot of work to do, and probably won't be
done before darcs 3, so we'll have to cope with unsafeInterleaveIO in the
meantime.)

Yours,
   Petr.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to