haskell hash function.