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.

Understanding the parenthesis in Haskell

Parenthesis is one of the most important syntax element in Haskell, unlike LISP, in which parenthesis is used for everything and always represent a list, Haskell use it in various different ways. This may add a little overhead for learning process. This is where the good old LISP shine, you don't have to learn about syntax since there is .

Haskell pattern matching and pattern overlap

In Haskell the patterns is written down one after another, it acts as a kind of case selection, when matching, those patterns are matched one by one, in the order that they are written down

In this case the order doesn't matter, they are distinct patterns, we can write it in different order with no problem