Shared publicly  - 
Making it a little easier to get a stack trace: Debug.Trace.traceStack
[commit: base] master: Add traceStack :: String -> a -> a (41bf1ae). Simon Marlow marlowsd at Wed Nov 30 14:48:08 CET 2011. Previous message: [commit: base] master: Use utf8 when decod...
Andy Gill's profile photoSimon Marlow's profile photoMd Mahmuduzzaman's profile photo
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?
+Andy Gill 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.
Add a comment...