Articles on Haskell

Last updated: 2022/08/23

Top deep-dives on Haskell

Names are not type safety

The User Wizard Scenario

Software projects usually start out fairly simple, but can then get very complicated, very quickly. Most of the time it feels like you're trading doing something fast for technical debt down the line. In this case study article, Eric Normand presents a real-life-esque situation that involves continuously changing specifications for a back end that is meant to validate and store user info. Eric demonstrates how you can use Haskell's type system to take a more dynamic approach towards writing flexible and clean code.

Don’t think, just defunctionalize

Joachim Breitner talks about how "CPS-conversion and defunctionalization can help you to come up with a constant-stack algorithm".

Objects in Functional Languages

OOP vs functional programming, the battle of the century! Honestly, I think debating about which is better is like debating what's better for building a house, a hammer or a saw. But I digress. In this article Getty Ritter, as the title suggests, covers what implementing an object in a functional programming language like Haskell would look like. Getty also highlights the advantages and disadvantages of using such an implementation.

How to deal with money in software

Sydney Kerckhove illuminates the potential problems when handling money in code and proposes potential solutions. Be aware that the library he recommends is his own. Information is good nonetheless though.

Existential optics

Marco Perone gives an easier to digest introduction (than we normally have) on optics, including lenses, prisms, different encodings, and composition.

Monad Confusion and the Blurry Line Between Data and Computation

Micah Cantor explains monads through the lens of first class functions as data.

Generalizing 'jq' and Traversal Systems using optics and standard monads

Traversal Systems, as defined by the author of this article Chris Penner, allow "you [to] dive deeply into a piece of data and may allow you to fetch, query, and edit the structure as you go while maintaining references to other pieces of the structure to influence your work". Basically it's a system for navigating and manipulating data structures where nesting is frequently used (JSON, HTML, CSS, etc). In this article, Chris builds one in Haskell to handle JSON, using optics and monads to query and update objects.

Teaching optics through conspiracy theories

Bartosz Milewski describes functional programming and lens principles using examples and analogies.

Review: Generic Parallel Functional Programming

Sandy Maguire uses Haskell to tackle the issue of performant parallel code being too complex to comfortably use in most applications. "No wonder we’re all stuck pretending our computer machines are single threaded behemoths from the 1960s"--ring a bell?

Ode to a Streaming ByteString

grep is the unexpected poster child for functional programming. Why? Because it "It hides the details of resource manipulation", "It consumes its input lazily", and "It cleans up its resources". In this deep dive, Patrick Thomson uses grep as a model program upon which to base a Haskell lazy I/O streaming implementation.

Applicatives should usually implement Semigroup and Monoid

Gabriella Gonzalez highlights why and when Applicatives should implement Semigroup and Monoid.

Review: Clowns to the Left of Me, Jokers to the Right

A zipper is a pointer or handle to a particular node in a tree or list structure. In this article, Sandy Maguire explores a paper by Conor McBride that goes into depth about "what happens to a zipper when we don’t require the elements on either side to have the same type".

Implementing Co, a Small Interpreted Language With Coroutines #2: The Interpreter

Working in software, you've probably dabbled with the idea of making your own programming language. What would it take? Abhinav Sarkar has written a series on implementing his own language called Co, in Haskell. In this article, Abhinav details the process of adding dynamic and strong typing, primitives, arithemtic operations, conditionals, and functions.

Nested strict data in Haskell

A space leak is when something in a program takes up more memory than expected (as a very broad definition). Theses are an issue, because they can eventually lead to your program crashing. In this article, Tom Ellis demonstrates how the bang operator can be used to prevent such leaks, highlights issues with the solution, and provides an alternative.

Dynamic Exception Reporting in Haskell

Matt Parsons presents his package for "robust exception reporting and diagnosing facilities" in Haskell, while giving insight into how exceptions work.


Want to see more in-depth content?

subscribe to my newsletter!

Other Articles