replace definition of error with errorWithStackTrace
Bertram Felgenhauer
bertram.felgenhauer at googlemail.com
Sat Jan 3 00:26:02 UTC 2015
Carter Schonwald wrote:
> how do profiling stack traces fit into that "Static" vs "Dynamic" continuum?
Except for the way they deal with recursion (if an SCC is already on
the SCC stack, then it is not pushed again), they're static traces,
going by the description at
https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_guide/profiling.html#prof-rules
Actually recursion poses an interesting problem for static traces;
it'd be awkward to see long traces like
foo -> foo.go -> ... -> foo.go -> bar
just because foo does some kind of iteration.
BTW, I'm not completely happy with the terminology. The idea is that
* 'static' traces match the function calls visible in the program's
source code.
* 'dynamic' traces very much depend on the evaluation order, which
in practice means that they're subject to optimization choices of
the compiler and non-determinism introduced by sparks and threads.
Perhaps 'call trace' and 'stack trace' are better names. A possible
downside with those terms is that they are familiar and used
interchangably for strict programming languages, so the fact that
there's a difference between them in Haskell is easily lost.
Cheers,
Bertram
More information about the Libraries
mailing list