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 gmail.com Wed Nov 30 14:48:08 CET 2011. Previous message: [commit: base] master: Use utf8 when decod...
25
4
Joel Kaasinen's profile photoAndy Adams-Moran's profile photoWilliam Roe's profile photoSergei Trofimovich's profile photo
4 comments
 
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...