Thanks for the explanations, understood.
In the case of src/Darcs/Patch/RepoPatch.hs I would slightly prefer
importing Darcs.Prelude unconditionally and instead suppress warnings
about redundant imports in that module.
Your changes that introduced the NonEmpty stuff to avoid warnings came
when I was not around to comment so it's not my place to complain now.
Still, for the record, I am not in favour of these developments. For
one, NonEmpty seems to be a moving target as we clearly see now. Also,
focussing on these few low-hanging fruits is pointless. It's been ages
since I actually stumbled over a "Prelude.head" pattern match error in
Darcs itself and if I actually did it would probably be an easy fix.
Look at the output of a
grep -r 'error "' src
to get a feel for how many of our own functions are partial. And note
that due to design mistakes from a looong time ago, we have lots of
places where we throw exceptions from supposedly pure code even though
they are clearly not "impossible".
|