> * better error handling when applying patches
OK. I was wondering whether it's good advice to suggest
"darcs repair" without being sure of the cause of an error,
but if the repo is not broken it should be harmless.
> * TreeMonad: factor out findItem
OK
> * TreeMonad: explicit import of D.U.Path, some simplifications
OK
> * TreeMonad: more fine grained error checks
OK, one minor comment:
> + Just _ ->
> + throw $
> + flip ioeSetErrorString "is a directory" $
> + mkIOError InappropriateType "readFile" Nothing (Just (displayPath p))
I had to poke around briefly to convince myself that we can't get `Stub` here
(because of the `expandTo` call in `findItem`). Maybe it'd be more defensive
to look for `Just (Subtree ...)` instead and have another fallthrough case?
But maybe that's overkill.
> * TreeMonad: add two comments and some code re-formatting
> +-- TODO It is unclean to throw exceptions from potentially pure code.
I think this depends on whether we expect to catch them or not. If we expect
them to abort the program, or at the very least to be caught in IO without
a strong expectation of _which_ exception will be thrown (as per "A Semantics
for Imprecise Exceptions"), I don't think it is unclean.
> * bugfix in TreeMonad rename
So much for my reviewing, as I didn't spot that :-)
|