<div>Adding sigfpe handling doesn't have a writeupnyet because it's on my holiday project queue and the specifics of doing it nicely depend somewhat on the target architecture. </div><div><br></div><div>If you want to get good errors in the mean time, register a sigfpe signal handler at the top level and invoke a smidge of c code to get info. </div><div><br></div><div>Granted this doesn't give you a stack trace ...</div><div><br><div class="gmail_quote"><div>On Wed, Dec 7, 2016 at 11:52 AM Dominic Steinitz <<a href="mailto:dominic@steinitz.org">dominic@steinitz.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello again,<br class="gmail_msg"><br><br class="gmail_msg"><br>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<br class="gmail_msg"><br><br class="gmail_msg"><br>> *Main> main<br class="gmail_msg"><br>> ghc: ghc-iserv terminated (-8)<br class="gmail_msg"><br>> Leaving GHCi.<br class="gmail_msg"><br><br class="gmail_msg"><br><br class="gmail_msg"><br>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.<br class="gmail_msg"><br><br class="gmail_msg"><br>There seems to have been some discussion of it on the ghc-devs mailing list in September (<a href="https://mail.haskell.org/pipermail/ghc-devs/2016-September/date.html" rel="noreferrer" class="gmail_msg" target="_blank">https://mail.haskell.org/pipermail/ghc-devs/2016-September/date.html</a>) but not much in the way of write up.<br class="gmail_msg"><br><br class="gmail_msg"><br>Dominic Steinitz<br class="gmail_msg"><br><a href="mailto:dominic@steinitz.org" class="gmail_msg" target="_blank">dominic@steinitz.org</a><br class="gmail_msg"><br><a href="http://idontgetoutmuch.wordpress.com" rel="noreferrer" class="gmail_msg" target="_blank">http://idontgetoutmuch.wordpress.com</a><br class="gmail_msg"><br><br class="gmail_msg"><br>_______________________________________________<br class="gmail_msg"><br>Glasgow-haskell-users mailing list<br class="gmail_msg"><br><a href="mailto:Glasgow-haskell-users@haskell.org" class="gmail_msg" target="_blank">Glasgow-haskell-users@haskell.org</a><br class="gmail_msg"><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</a><br class="gmail_msg"><br></blockquote></div></div>