Skip to content

Instantly share code, notes, and snippets.

@caiorss
Created October 26, 2016 21:54
Show Gist options
  • Save caiorss/908ebe16f8d72595fb084b0df70823e5 to your computer and use it in GitHub Desktop.
Save caiorss/908ebe16f8d72595fb084b0df70823e5 to your computer and use it in GitHub Desktop.
Debugging in Haskell's GHCi

Debugging in Haskell's GHCi

  • Enter GHCi (via Stack)
stack ghci
  • Enable functions to break on exceptions
:set -fbreak-on-exception
  • Reload GHCi
:reload -- Also :r
  • Call and trace your function
:trace myFunction x y z
  • Use :history and :back to move through the "call stack"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment