Today I was writing a lot of Hashable instances, and found it hard to read code littered long lines mostly consisting of `hashWithSalt`, so I made a synonym:

infixl 5 ##
(##) = hashWithSalt

But when I replaced all the `hashWithSalt`s with ##, I got lots of weird errors -- GHC kept wanting things to be Strings that were Ints, or vice verse. The problem vanished when I added this type signature:

(##) :: Hashable a => Int -> a -> Int

That's exactly the same type signature that hashWithSalt has.

Is this expected behavior? Desirable?


--
Jeff Brown | Jeffrey Benjamin Brown
Website   |   Facebook   |   LinkedIn(spammy, so I often miss messages here)   |   Github