|
|
|
|
|
by creichert
4274 days ago
|
|
ghc has an RTS option to locate errors of that nature: -xc
(Only available when the program is compiled for profiling.) When an exception is raised in the program, this option causes a stack trace to be dumped to stderr.
This can be particularly useful for debugging: if your program is complaining about a head [] error and you haven't got a clue which bit of code is causing it, compiling with -prof -fprof-auto and running with +RTS -xc -RTS will tell you exactly the call stack at the point the error was raised. http://www.haskell.org/ghc/docs/7.8.3/html/users_guide/runti... |
|