Hi Emmanuel,<div><br></div><div>It is indeed good practice to write total programs in general. However, I understand the need for stack traces in practice.</div><div><br></div><div>There are some slides by Simon Marlow on the issue, ironically using your example in the title.</div>

<div><br></div><div>In short: check the -xc flag inĀ <a href="http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/runtime-control.html">http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/runtime-control.html</a></div>

<div><br></div><div>Hope this helps,</div><div>Ozgur</div><div><br></div>