Division by 0 exits ghci
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Tue Sep 17 19:24:16 EDT 2002
George Russell <ger at tzi.de> wrote,
> In fact the problem is more drastic than I mentioned in my last message; division by 0
> doesn't seem to be catchable at all. From this program
> ----------- cut here -----------------------
> import Exception
>
> main =
> do
> excep <- Exception.try (seq (1 `div` 0) (return ()))
> putStrLn "Survived"
> ----------- cut here ----------------------
> I get the output "Arithmetic Exception" on Solaris and "Floating point exception" on Linux,
> while I think I ought to get "Survived".
AFAIK, this is a known bug. Maybe you should enter it into
the bug tracker, so that it remains known ;-)
Cheers,
Manuel
More information about the Glasgow-haskell-bugs
mailing list