[Haskell] Strange type inference