Data.Ratio and exceptions

Simon Marlow marlowsd at gmail.com
Tue Jun 12 13:08:01 CEST 2012


On 06/06/2012 06:11, Kazu Yamamoto (山本和彦) wrote:
> Hello,
>
>> The essential nature of the function wouldn't be altered any, it'd
>> just give a more precise error. Seems like an improvement regardless
>> of how one feels about errors/exceptions/bottoms.
>>
>> Also, I think using DivideByZero is appropriate here. No need to
>> invent a new exception type.
>
> GHC.Real uses the error function in some places. I believe that most
> cases should be throw ArithException. I will survey and make a
> comprehensive proposal.
>
> If there are other modules to be surveyed, please let me know.

I'll go ahead and make this change.  Thanks for the suggestion!

Cheers,
	Simon




More information about the Libraries mailing list