Proposal: Add Eq instance for Control.Exception.ErrorCall
roma at ro-che.info
Tue Nov 27 13:48:51 CET 2012
* Simon Hengel <sol at typeful.net> [2012-11-27 12:37:44+0100]
> Please don't get me wrong. Personally I always prefer pattern matching
> over /exception throwing functions/. However, I still think making it
> hard to "deal" with exception throw function is the wrong approach.
> Regarding testing: Failure behavior is part of the public interface of a
> function. If a function throws an exception (whether I like it or not),
> I'd like to have it documented. The best way to document something is a
> test case (IMHO).
Isn't the person who writes tests usually the same as the person who
writes the code which is being tested? So, if writing tests for
ErrorCall is inconvenient, that would (hopefully) encourage people to
write their own, meaningful, exceptions.
More information about the Libraries