Declaring Types and Classes
Course subject(s)
Module 09. Declaring Types and Classes
So far in this course we have mostly glued together existing types and functions. In this lecture we introduce mechanisms for declaring new types and type classes in Haskell, and show how to develop a simple abstract machine.
You will have to read how to define a type class and how to instantiate it by yourself. In order to do this, carefully read and understand Section 10.6 of Programming in Haskell by Graham Hutton (In fact, you shoud study the whole chapter!).
This link can also be an alternative source for understanding type classes.
Introduction to Functional Programming by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://ocw.tudelft.nl/courses/introduction-to-functional-programming/.