Free Monads have become the bread and butter of the pure functional programmer. They help us to move side effects out of our code giving us better testability by separating syntax and semantics of our DSLs. But there's a twist. Some of our programs can end up with dreadful performance, leaving us unhappy and frustrated. In this talk we are going to shed some light on the Codensity Monad which helps us to improve the asymptotic performance of our Free Monad computation keeping us happy and pure.
Talk objectives:
- Establishing the problem that we are trying to solve by giving an example using basic Lists and generalizing the idea to be able to use it with Free Monads.
- This talk will recap some concepts like Monoids, DLists and Free Monads. As well as some bits and pieces of the math behind them.
Finally we are going to learn about the Codensity transformation and how to use it to improve program performance where possible.
Target audience:
- Haskell programmers who are familiar with concepts like Free Monads.
raichoo is fascinated by programming for nearly 25 years now and currently obsessed with functional programming, category theory and type theory. He's working in the industry using Haskell as one of his main programming languages to write everything from web-applications to parsers and compilers as well a giving workshops about functional programming.
He is also the author of the Idris JavaScript backend, various libraries and Vim plugins.
Github: raichoo
Twitter: @raichoo