Re: Floating Point Exceptions

2016-12-07 Thread Carter Schonwald
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.

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.

Granted this doesn't give you a stack trace ...

On Wed, Dec 7, 2016 at 11:52 AM Dominic Steinitz <domi...@steinitz.org>
wrote:

> 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
>
> domi...@steinitz.org
>
> http://idontgetoutmuch.wordpress.com
>
>
>
> ___
>
> Glasgow-haskell-users mailing list
>
> Glasgow-haskell-users@haskell.org
>
> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>
>
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users


Floating Point Exceptions

2016-12-07 Thread Dominic Steinitz
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
domi...@steinitz.org
http://idontgetoutmuch.wordpress.com

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users