Alejandro Serrano Mena - All You Wanted to Know About Type Classes

Опубликовано: 30 Ноябрь 2024
на канале: Konfy
1,122
28

Special thanks to the Haskell Foundation for supporting the production of this video!

Haskell Love 2021 schedule: https://emamo.com/event/haskell-love
Haskell Love twitter:   / _haskellove  


This talk focuses on one important slice of the Haskell language, type classes, from the beginning to the myriad of extensions related to it. The goal is to understand the two axes in which type classes make their magic:

1. Resolution, that is, how the compiler figures out which instance applies in each context.
2. Elaboration, that is, how the compiles code using type classes.

The rough outline of the talk (subject to suggestions from the reviewers) would be:

"Simple" type classes and ad-hoc polymorphism, - Translation of type classes to records, - Resolution as a search problem: Haskell 2010 conditions and the `FlexibleInstances` and `FlexibleContexts` extensions, - Multi-parameter type classes, - Using type classes to encode complex rules, and the need for `UndecidableInstances`, - Asking for the infinite with `QuantifiedConstraints`.