Chapter 3
Exploring Haskell
Section 4
Debugging with GHCi
Haskell employs a non-strict evaluation strategy which can be strange for newcomers to the language. Furthermore, we will inevitably write buggy code. GHCi has useful debugging capabilities that can allow to address both of these concerns. - Learn about the location of GHCi’s configuration file and set up a GHCi session for debugging - Set breakpoints, run code, examine bindings including unevaluated thunks - Show bindings, breakpoints, list program source code, abandon sessions, and quit