This module defines a class, Hashable, for types that can be
converted to a hash value. This class exists for the benefit of
hashing-based data structures. The module provides instances for
most standard types. Efficient instances for other types can be
generated automatically and effortlessly using the generics support
in GHC 7.2 and above.

The easiest way to get started is to use the hash function. Here
is an example session with ghci.

Hashing and security

Applications that use hash-based data structures to store input
from untrusted users can be susceptible to "hash DoS", a class of
denial-of-service attack that uses deliberately chosen colliding
inputs to force an application into unexpectedly behaving with
quadratic time complexity.

At this time, the string hashing functions used in this library are
susceptible to such attacks and users are recommended to either use
a Map to store keys derived from untrusted input or to use a
hash function (e.g. SipHash) that's resistant to such attacks. A
future version of this library might ship with such hash functions.

If two values are equal according to the == method, then
applying the hashWithSalt method on each of the two values
must produce the same integer result if the same salt is
used in each case.

It is not required that if two values are unequal
according to the == method, then applying the
hashWithSalt method on each of the two values must produce
distinct integer results. However, the programmer should be
aware that producing distinct integer results for unequal
values may improve the performance of hashing-based data
structures.

This method can be used to compute different hash values for
the same input by providing a different salt in each
application of the method. This implies that any instance
that defines hashWithSaltmust make use of the salt in
its implementation.

Like hashWithSalt, but no salt is used. The default
implementation uses hashWithSalt with some default salt.
Instances might want to implement this method to provide a more
efficient implementation than the default implementation.