Data.Ratio and exceptions

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


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?


More information about the Libraries mailing list