IA014 Advanced Functional Programming

Lecture V - Type Classes

Lecture dates

7. 4. 2021 [motivation, introduction, compilation - till slide 14]

14. 4. 2021 [class hierarchy, constructor type classes, multi-parameter type classes, functional dependencies]

Reading

Primary papers

P. Wadler, S. Blott: How to make ad-hoc polymorphism less ad  hoc. POPL'89. [PS]

The paper which introduced type classes. Still great place to start with type classes. You will recognize some material from the lecture.

M. Jones: Functional Programming with Overloading and  Higher-Order Polymorphism. AFPT Spring School 1995. [PDF]

Sums  up the qualified types and constructor classes. Very accessible.

Additional material

M. Jones: A theory of qualified types. ESOP’92.

The paper which introduced qualified types.

M. Jones: A system of constructor classes. FPCA’93.

Constructor classes were introduced here.

M. Jones: Type Classes with Functional Dependencies. ESOP'00.

Introduced the correct way of handling multiparameter type classes.

A History of Haskell: Being Lazy With Class. 2007. (Section 6) [PDF]

J. Peterson and M. Jones: Implementing Type Classes. PLDI'93. [PS]

C. Hall, K. Hammond, S. Peyton Jones, P. Wadler: Type classes in Haskell. ESOP'94. [PS]

Corresponding book chapters

Slides

Chyba: Odkazovaný objekt neexistuje nebo nemáte právo jej číst.
https://is.muni.cz/el/fi/jaro2021/IA014/um/05-typeclasses.pdf

Code

Chyba: Odkazovaný objekt neexistuje nebo nemáte právo jej číst.
https://is.muni.cz/el/fi/jaro2021/IA014/um/51711414/lec5.hs
Chyba: Odkazovaný objekt neexistuje nebo nemáte právo jej číst.
https://is.muni.cz/el/fi/jaro2021/IA014/um/51711414/collect.tgz

Lecture recordings

Chyba: Odkazovaný objekt neexistuje nebo nemáte právo jej číst.
https://is.muni.cz/el/fi/jaro2021/IA014/um/vid/2021-04-07b_ia014.mp4
Chyba: Odkazovaný objekt neexistuje nebo nemáte právo jej číst.
https://is.muni.cz/el/fi/jaro2021/IA014/um/vid/2021-04-14_ia014.mp4