Data.Ratio and exceptions

Kazu Yamamoto ( 山本和彦 ) kazu at iij.ad.jp
Tue Jun 5 07:14:48 CEST 2012


Hello, 

Some functions in Data.Ratio call the error function. The following is
an example:

    recip (0:%_)        = error "Ratio.%: zero denominator"

We cannot catch this error as ArithException since it is ErrorCall.
Are there any reasons to not use ArithException?

--Kazu



More information about the Libraries mailing list