S.D.Mechveliani writes:
> In ghc-2.08-linux
>
> main = putStr (show (rem 1 0::Integer))
>
>
> reports "Floating exception" which is rather dim for the user.
>
Thanks for reporting this, the underlying GNU multi-precision library
does intentionally divide by zero here, leaving it up to the
application to handle the ensuing exception. Needless to say, ghc
doesn't catch the above case before it happens nor after.
At the cost of an Integer comparison, the error could easily be caught,
i.e., mimic for Integer what is done for `rem' and friends in the
Integral instance for Int in ghc/lib/ghc/PrelNum.lhs
--Sigbjorn