Making it a little easier to get a stack trace: Debug.Trace.traceStack
23 plus ones
Shared publicly•View activity
- This is great Simon!
Are you planning on having the pattern match compiler fails use the stack trace information in error messages? Or calls to error?Nov 30, 2011
- it's a bit tricky. Usually calls to error end up in CAFs because GHC lifts them to the top level, and then the stack you get is not useful. There is an RTS flag to dump a stack trace when an exception is thrown: +RTS -xc, and in 7.4.1 I've beefed this up a bit so that if the stack ends in a CAF it tries to find the stack of the caller and print that too. I don't know if/how we should expose this through a Haskell API.Nov 30, 2011
- 7.4.1Jul 9, 2012
- All are goodMay 9, 2014