Please log in to watch this conference skillscast.
When writing programs, it often turns out to be useful to separate the description of what to do from a concrete implementation that actually performs the actions. You can do so by turning your descriptions into pure data. Then you can analyze them, transform them, and ultimately interpret them in any way you like.
If your descriptions are imperative in nature, it's natural to try to make them monadic. But the usual suspects such as Maybe, State, or IO aren't quite suitable here: they all add a concrete monadic effect, but we'd just like to obtain an abstract description of a sequential program, that we can later interpret in a concrete way. This is what "free" monads give you. In this talk, we'll discuss what free monads are, how they work, and how you can use them.
YOU MAY ALSO LIKE:
- Deriving Via (SkillsCast recorded in October 2018)
- Haskell eXchange 2022: Novice Track (Online Conference on 7th December 2022)
- Haskell eXchange 2022: Online Conference (Online Conference on 8th - 9th December 2022)
- Haskell: Why and How the External STG Interpreter is Useful (SkillsCast recorded in December 2021)
- Keynote — Haskell: What To Do When Success Can't Be Avoided (SkillsCast recorded in November 2021)
Monads for free!
Andres Löh is a Haskell consultant and co-owner of Well-Typed LLP. He is based in Regensburg, Germany. He started using Haskell in 1997, when being an undergraduate student of mathematics in Konstanz and has been an enthusiastic functional programmer ever since. Andres obtained a PhD in Computer Science from Utrecht University in 2004, on extending the Haskell language with capabilities for datatype-generic programming. After having been a university lecturer for several years, he joined Well-Typed in 2010.