[Haskell] need some help with type inference