Data.Ratio and exceptions

wren ng thornton wren at freegeek.org
Wed Jun 6 06:51:09 CEST 2012


On 6/5/12 9:35 PM, Conrad Parker wrote:
> +1 to Kazu's suggestion to throw DivideByZero.

Another +1 from me.

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.

-- 
Live well,
~wren



More information about the Libraries mailing list