Type level arithmetic in Haskell

Posted on Dec 20, 2022
tl;dr: Watch the video!

Seize two meaningless constants from the void, and imbue them with meaning. […] To birth an algebra into the world is a beautiful thing. - Kyle Kingsbury

Type-level arithmetic in Haskell is an interesting and powerful concept that allows programmers to manipulate types as if they were numbers. While it may sound simple, just adding two numbers together at the type level can be a complex task that requires a deep understanding of Haskell’s type system.

In my lightning talk for UWCS, I explored the basics of type-level arithmetic and demonstrated how it can be used to create useful and powerful programs. This talk was an extension of a previous one I did, and a counterpart to an essay I wrote, for CS349 - Principles of Programming Languages, where I delved even deeper into the subject and covered more advanced concepts.

Some more resources are available below:

Visit project ⟶