Haskell typeclasses and automatic derivation

To make a type an instance of a class, we can either provide our implementation or use the default implementation by a mechanism called deriving.

The default implementaion will be exactly what you expected.