Is there a generic function (printCallStack
) that will print the call stack of a recursive loop.
For example,
printCallStack(length ([7, 1 'quot' 0]))
prints call stack :
Is there a generic function (printCallStack
) that will print the call stack of a recursive loop.
For example,
printCallStack(length ([7, 1 'quot' 0]))
prints call stack :
It seems that you are looking for something like Hat, which is a source level tracer for haskell, and possibly specifically for hat-stack, which is the stack tracer component.
You can alternatively use the debugger/tracer built into ghci. Not as nice as hat, but doesn't require to recompile your code and it's readily available. In case you wonder, it's the :trace
command in ghci.