[Haskell-cafe] Exceptions

Simon Peyton-Jones simonpj at microsoft.com
Mon Oct 4 04:30:22 EDT 2004

Actually GHC does exactly that when you compile with -prof -auto-all.
Then if you run with +RTS -xc, you get a backtrace of sorts.  (I have
not tested this recently!)  The backtrace is not yet reified into a data
structure that can be examined, but that'd be quite doable if someone
wanted to try.

The downside is that -prof makes many optimisations work less well, and
all modules must be compiled this way.  


| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of MR
| Sent: 01 October 2004 18:29
| To: alastair at reid-consulting-uk.ltd.uk; haskell-cafe at haskell.org
| Cc: k.schupke at imperial.ac.uk; jgoerzen at complete.org
| Subject: Re: [Haskell-cafe] Exceptions
| >But, being able to see the context in which a thunk was constructed
would be
| >extremely useful.
| Yes of course... I was thinking along the lines of what is possible,
| than what is desirable. If only ghc had a -g (debug) flag like gcc
that would
| force each funtion to push its entry onto some kind of call stack that
| be returned by exceptions...
| Keean.
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list