Without knowing too much about your project setup, and if I'm understanding correctly, see

http://haddock.stackage.org/lts-5.1/base-4.8.2.0/Debug-Trace.html#v:traceStack

Keep in mind that you have to build with the corresponding flags in order to get it working correctly. Assuming you're using stack that would be:

stack build --enable-profiling --library-profiling --ghc-options="-fprof-auto-rtsopts"

Though I'm not sure if that's 100% what you're looking for since it doesn't break as much as that it logs with a stack trace.

Hope it helps!

 
----------------------------------------------------------------------

Message: 1
Date: Thu, 28 Jul 2016 16:43:03 +0300
From: Constantine Kharlamov <hi-angel@ya.ru>
To: haskell-cafe@haskell.org
Subject: [Haskell-cafe] Breaking in library, and getting stacktrace
Message-ID: <147361469713383@web5j.yandex.ru>
Content-Type: text/plain; charset="utf-8"

An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160728/b4652af8/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe


------------------------------

End of Haskell-Cafe Digest, Vol 155, Issue 33
*********************************************



--
Carlos D'Agostino.