There are too many error handling conventions used in library code!
Donald Bruce Stewart
dons at cse.unsw.edu.au
Sat Mar 10 19:33:57 EST 2007
This article on the 8 different error handling strategies various common
Haskell libs use:
got me thinking:
we need to standardise/recommend a small set of methods for library
The lack of consistent error reporting between libs results in verbose
code, as we're not able to use a single error handling technique when
gluing together code from different libs (i.e. we can't just use Maybe
(It's always nice when you *can* use, say, a Maybe monad to glue code
from a number of sources, but eventually you reach code with a different
error system, and the Maybe monad breaks down).
So, some questions I think we can tackle:
* can we identify error handling strategies from the list that should
not be used anymore? (throwDyn?)
* can we move some of the outlying libraries to a more consistent error framework?
* do we need more support for gluing together our different error systems?
(it should be easier to glue code using , say, Maybe/Either).
* what role does MonadError play here, as a generic error handler?
* can we make precise recommendations about which error strategies to use?
More information about the Libraries