[Haskell] Problem with constructing instances for a class Pair