I have a nonterminating expression in Haskell. I want to debug and inspect the reason why it is not terminating. A technique I learned is to use the following in GHCi:
:set -fbreak-on-exception
:trace nonterminating_expression
^C
:hist 50
So I can see the instructions that are running in the infinite computation. The problem is that I would like to continue the computation with :step
, ignoring the interrupt. Can I do that?
Any other solutions for debugging nonterminating computations? (History larger than 50 records or other practices to help the task.)