Skip to content
0:00 / 0:00

#ghci#debugging#haskell

GHCi's Debugger - Haskell from Scratch #2

jekor

6.6K subscribers • 6 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Linked in the descriptionjekor/redo

Beginner. No background in the topic needed.

19K views13 years ago2 recommendations

Programming languagesTools and practiceHaskellDebuggingThe shell and command line

An introduction to interactive step-by-step debugging in Haskell using GHCi's built-in debugger.

Interactive debugging is possible in Haskell with GHCi. We'll look at how, and use it to fix what broke last episode. Then, we'll extend the implementation to support target selection on the commandline. Links from the video: magit.github.io/magit/ Follow along on GitHub at github.com/jekor/redo Notices and updates on Twitter at @jekor twitter.com/jekor All Haskell from Scratch videos: youtube.com/playlist?list=PLxj9UAX4Em-Ij4TKwKvo-SLp-Zbv-hB4B

Why it's here

2 people recommend this

What people say. Recommended as a clear tutorial on how to perform step-by-step debugging in Haskell using GHCi.

Moments people linked to

u/alt_account10in r/haskell • Recommends

On “How do you debug programs?”

This is the best you'll get, aside from what /u/gelisam commented; which can be considered a tutorial in itself. One thing that I really like (and doesn't show through the examples), is that when you `:list` the current context it highlights (bolds in a terminal) the expression that is up for evaluation next (as in, what will get invoked when you type `:step`) I also found this video, which looks well done (quality wise), but I haven't watched it. Maybe you can comment back on how helpful that is :)

u/gilmiin r/haskell • Recommends

On “How you debug complex code in FP Complete?”

> It is not possible to do step-by-step debugging. You can do step-by-step debugging using ghci

u/gelisamin r/haskell • Mentions

On “Using protocol buffers in ghc 7.10”

Here is a video in which Jekor gives another reason, namely to make it easy to figure out which import each symbols came from. I personally use the same ad-hoc style as in the patch, as I don't feel like fixing these bugs or finding the definition of a symbol is particularly hard.
1View on Reddit