ghci doesn't like mod
Simon Marlow
simonmar at microsoft.com
Tue Jul 30 09:12:06 EDT 2002
> I had to kill ghci-5.02 for the following expression and
> ghci-5.04 is not
> much better:
>
> ~/source/gtk2hs/gtk:$ ghci
> ___ ___ _
> / _ \ /\ /\/ __(_)
> / /_\// /_/ / / | | GHC Interactive, version 5.02.2,
> for Haskell
> 98.
> / /_\\/ __ / /___| | http://www.haskell.org/ghc/
> \____/\/ /_/\____/|_| Type :? for help.
>
> Loading package std ... linking ... done.
> Prelude> 1 `mod` 0
> ^CTerminated
Yes, that was a bug.
> ~/source/gtk2hs/gtk:$ ~/local/bin/ghci
> ___ ___ _
> / _ \ /\ /\/ __(_)
> / /_\// /_/ / / | | GHC Interactive, version 5.04, for
> Haskell 98.
> / /_\\/ __ / /___| | http://www.haskell.org/ghc/
> \____/\/ /_/\____/|_| Type :? for help.
>
> Loading package base ... linking ... done.
> Loading package haskell98 ... linking ... done.
> Prelude> 1 `mod` 0
> Floating point exception (core dumped)
> ~/source/gtk2hs/gtk:$
>
> I think a normal exception is more appropriate here...
Yes, that's on the ToDo list. In our defence though, the documentation
does state that the DivideByZero exception isn't raised by GHC at the
moment.
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list