[Haskell] type inference & instance extensions