On 25/04/2012 17:28, Ozgur Akgun wrote: > Hi, > > On 25 April 2012 16:36, Michael Snoyman <[email protected] > <mailto:[email protected]>> 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: http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.5.0.0/GHC-Stack.html > 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: http://community.haskell.org/~simonmar/Stack-traces.pdf Cheers, Simon _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
