Guide to the Haskell Type System

1 day

In this one-day course, we are providing an in-depth look into Haskell’s type system, including the various language extensions that the Glasgow Haskell Compiler (GHC) has to offer.

Haskell is an evolving language. With each new GHC release, there are some new features, many of which add extra power to Haskell’s already remarkable type system. But which extensions are widely used? Which are stable? How can one find out how they really work? While many features are really interesting, documentation is often scarce, and scattered around in various places such as blog posts and academic papers.

In this course, we’ll provide a much needed overview, and then discuss the most important concepts systematically: from higher-rank polymorphism over GADTs and data kinds to type families and System FC (the formal system that GHC’s core language is based on). We’ll discuss how to use all these features, provide motivation and typical use cases, and warn about possible pitfalls. The course is hands-on, a combination of presentations and exercises. Exercises consist of carefully chosen small examples that illustrate the concepts discussed, and are often based on real-world libraries that you can find on Hackage.

This course is designed such that Fast Track to Haskell covers all its prerequisites. However, the course is likely to be enjoyed more by participants who already have gained some practical experience in writing Haskell code.

Schedule

The course includes the following topics:

Polymorphism

  • Parametric polymorphism revisited
  • Universal vs. existential quantification of types
  • Higher-rank polymorphism

Types and Kinds

  • Haskell’s kind system
  • Working with GADTs
  • Promoting datatypes to kinds
  • Kind polymorphism

Type-level Programming

  • Type families
  • Type equality
  • Constraint kinds
  • System FC

Cost

The base price of this course is GBP 1750 (single lecturer) or GBP 2750 (two lecturers). The base price excludes VAT and any other applicable taxes as well as travel costs which depend on the location of the course venue.

We generally recommend two lecturers, as it will allow a better ratio between lecturers and participants during the exercises, and will thereby encourage particpants to ask more questions. We strongly encourage to use two lecturers if there are more than five participants.

We offer on-site consulting in combination with on-site courses at a reduced daily rate.

If you are interested in this course, or for more information, please e-mail us with as many details as possible.

Why Well-Typed

Our teachers have more than a decade of experience with Haskell, functional programming, compiler design, and related areas. They have been training people at all experience levels, both in academia and in industry.

The insight they brought about how to think in Haskell was great and something that would be very difficult to get from a book or online.

— Anonymous