[Haskell] Functional dependencies and type inference (2)