Floating Point Exceptions

Dominic Steinitz dominic at steinitz.org
Wed Dec 7 16:51:49 UTC 2016


Hello again,

I removed my dependency on hmatrix and enabled floating point exceptions via `feenableexcept` hoping to get a call stack showing me where the exception was being raised but alas all I get is

> *Main> main
> ghc: ghc-iserv terminated (-8)
> Leaving GHCi.


My googling didn’t turn up much but as far as I can tell ghc does *not* handle sigfpe (googling "haskell sigfpe” turns up blog posts on Haskell by someone called “sigfpe”). I think it would be jolly useful to be able to get stack traces of floating point exceptions. How much work would this be? I’d be happy to have a go at it if someone could provide help and guidance.

There seems to have been some discussion of it on the ghc-devs mailing list in September (https://mail.haskell.org/pipermail/ghc-devs/2016-September/date.html) but not much in the way of write up.

Dominic Steinitz
dominic at steinitz.org
http://idontgetoutmuch.wordpress.com



More information about the Glasgow-haskell-users mailing list