Proposal: Add Eq instance for Control.Exception.ErrorCall

Michael Snoyman michael at snoyman.com
Tue Nov 27 13:09:14 CET 2012


On Tue, Nov 27, 2012 at 1:59 PM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:

>
> On Tue, 27 Nov 2012, Michael Snoyman wrote:
>
>  +1 on the proposal. Even if I'm opposed to partial functions, I'm in
>> favor of making it easier to test them reliably.
>>
>
> How can you be sure that you get a certain error? Depending on the order
> of evaluation you might get different error messages if there are multiple
> possible ways to fail. I think automated testing against specific error
> messages will not work reliably.
>

Sure, in some cases that's true. The idea would be to structure the test
case in such a way that we no with certainty which way it will fail.
Simon's initial example will always fail in the same way.

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20121127/0dcc00c2/attachment.htm>


More information about the Libraries mailing list