The Haskell type system is good for specifying user intentions and helping the compiler to check code correctness. Unfortunately, there is sometimes a barrier before that level where beginning Haskell programmer can read and write complex type annotations. This is often the case with such libraries as Lens or Servant. With this tutorial, I aim to bring participants behind that barrier. I’ll present several type-level programming tools including type families, GADTs, data kinds, and others all way down to ‘almost’ dependent types. Their description will be given together with practical examples as used in the modern Haskell libraries.
Vitaly Bragilevsky works as a Senior Lecturer at the Southern Federal University in Rostov-on-Don, Russia where he teaches undergraduate students functional programming and theory of computations. He serves as both the Haskell 2020 Language Committee and the GHC Steering Committee member. He is the author of ‘Haskell in Depth’ (Manning Publications, available via Manning’s early access program).