úγÁportable (Haskell 2010) provisionalniswegmann@gmail.comA 32-bit hash. 6Type class for computing hash generators from values. %Making custom data types instantiate  is straightforward; given $ the following tree data structure:   data Tree a  = Tip  | Bin a (Tree a) (Tree a) ...we make it instantiate  like this:  0 instance Hashable a => Hashable (Tree a) where " hashGen Tip = salt 0x0 K hashGen (Bin x l r) = hashGen x `combine` hashGen l `combine` hashGen r For sum data types such as ! we typically want to avoid that   Left "foo" hashes to the same hash as   Right "foo" ...hence we add some  for each constructor: B instance (Hashable a, Hashable b) => Hashable (Either a b) where 4 hashGen (Left x) = salt 0x1 `combine` hashGen x 4 hashGen (Right y) = salt 0x2 `combine` hashGen y +Returns a hash generator for the argument. MA hash generator is a function that maps a hash state into a new hash state. A The internal representation of hash states is kept transparent.  BReturns a hash generator that mixes its input with a 32-bit word. > Is typically used for enumerating constructors when deriving . LCombines two hash generators such that the output of the first generator is B piped into the next. This works similar to function composition.  Indeed, for all f, g, h, we have that < f `combine` (g `combine` h) == (f `combine` g) `combine` h Computes a 32-bit hash from a hashable value.     murmurhash3-1.0Data.Digest.MurmurHashHashablehashGenHashGensaltcombinehashbase Data.EitherEithermixfinalize runHashGen hashWord8 hashWord16 hashWord32 hashWord64hashInt hashInteger