John Wiegley

John Wiegley is principal engineer at DFINITY, where he uses Rust, Nix and Haskell to build the next generation of distributed compute infrastructure. His other interests include Emacs, Category Theory, Coq and mathematics. He is the author of the Ledger, started the plaintext accounting movement, and in his spare now works on software using Haskell for trade journaling.

Technique for writing debuggable Haskell functions

Many problems can be broken into two parts: Determining what must be done, and taking actions on that knowledge. This is similar to how compilers are divided into front-ends and back-ends. In Haskell, if you find yourself writing a function with complex behavior, separating calculation from behavior can make the function easier to test and debug. In this talk we’ll look at a running example of this technique and some of the forms it can take.