Skip to content
0:00 / 0:00

#ghci#ghc#debugging

HaskellerZ - October 2019 - Roland Senn - The GHCi debugger

Zürich Friends of Haskell

2K subscribers • 17 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Roland Senn

Beginner. No background in the topic needed.

1.3K views6 years ago1 recommendation

Programming languagesTools and practiceHaskellDebugging

Roland Senn demonstrates how to use the built-in interactive debugger in GHCi, covering commands, breakpoints, and history tracing.

Zurich Haskell meetup: meetup.com/HaskellerZ/events/265429171/ Slides: drive.google.com/file/d/0B6gkA90tncudTkE3TURVSjAyRjNaUk90Mjh… Examples: drive.google.com/open?id=1E68Cg2ZkQrz_cOjb0dDf4YTn1csFm9kW Roland Senn - The GHCi debugger GHCi is not only a well known and heavily used interactive evaluator of Haskell code. It also contains an integrated interactive debugger, but a lot of Haskellers don't use it. However, in some situations GHCi debugging is really helpful. In this beginner friendly talk, I will go through all the different GHCi debugger commands and explain how they work. I will demonstrate most of them on a short code example and sometimes I'll point to the common pitfalls. At the end I will give a brief explanation how this debugger is implemented.

Why it's here

1 person recommends this

What people say. Recommended as a highly useful guide to the lesser-known debugging features of GHCi.

u/BayesMindin r/haskell • Recommends

It turns out, GHCi is a (well-featured) debugger too! *Ex:* you can apply arbitrary functions as predicates to enact a branching logic on the places you set break points, and you can block execution at those locations to poke around. Oh, and you if you use `:trace` to execute a function, you can time travel through your `:history`. I just watched this video, and it's a bit slow and poor audio, but here's one file I drafted as an example of a lot of his ideas. *Usage* : Save this to `debugging_sandbox.hs`, and follow the instructions in the top comment in the file. #!/usr/bin/env stack {- stack --resolver lts-14.5 exec ghci -} {- 1. `stack…