[Haskell-cafe] Printing call site for partial functions
marlowsd at gmail.com
Thu Apr 26 09:50:40 CEST 2012
On 25/04/2012 17:28, Ozgur Akgun wrote:
> On 25 April 2012 16:36, Michael Snoyman <michael at snoyman.com
> <mailto:michael at snoyman.com>> wrote:
> Prelude.head: empty list
> Recent versions of GHC actually generate a very helpful stack trace, if
> the program is compiled with profiling turned on and run with -xc.
Right. Also don't forget to add -fprof-auto.
There's an API to get access to the stack trace too:
> See: http://community.haskell.org/~simonmar/slides/HIW11.pdf
> (Ironically titled "Prelude.head: empty list")
A more recent talk about this with more details is here:
More information about the Haskell-Cafe