Typeclasses: ad-hoc polymorphism in Haskell

Due Wednesday Sept 11 @ 9 am

From this assignment, students will show...

Functional Programming - Recall

by using functions that use ad hoc polymorphism (via typeclasses).

Abstractions and Representations - Recall

by instantiating typeclasses for a new datatype.

You will need...

Let's begin

Please do the 5 examples outlined in comments in src/Lib.hs

Step-by-step instruction

Typeclasses: Ad-hoc polymorphism (vs parametric polymorphism)

Using common Typeclasses

Typeclasses and inference

Defining new Typeclasses

META.md

META.md should include

  1. your name
  2. your utln
  3. how much time you spent on this assignment
  4. the witness "proof" for how you earned each learning objective

Further Reading

Ch. 6 of Haskell Programming from first principles has great activities on Typeclasses.

Please Submit

Contents to be submitted

Method of submission

Please commit your changes in the hw02-1 directory of your private repo.