-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A class for types that can be converted to a hash value
--
-- This package 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 package provides instances for
-- basic types and a way to combine hash values.
@package hashable
@version 1.0.1.0
-- | 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 basic
-- types and a way to combine hash values.
--
-- The hash function should be as collision-free as possible,
-- which means that the hash function must map the inputs to the
-- hash values as evenly as possible.
module Data.Hashable
-- | The class of types that can be converted to a hash value.
class Hashable a
hash :: Hashable a => a -> Int
-- | Compute a hash value for the content of this pointer.
hashPtr :: Ptr a -> Int -> IO Int
-- | Compute a hash value for the content of this ByteArray#,
-- beginning at the specified offset, using specified number of bytes.
-- Availability: GHC.
hashByteArray :: ByteArray# -> Int -> Int -> Int
-- | Combine two given hash values. combine has zero as a left
-- identity.
combine :: Int -> Int -> Int
instance Hashable ByteString
instance Hashable ByteString
instance Hashable a => Hashable [a]
instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => Hashable (a1, a2, a3, a4, a5, a6, a7)
instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6)
instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable (a1, a2, a3, a4, a5)
instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable (a1, a2, a3, a4)
instance (Hashable a1, Hashable a2, Hashable a3) => Hashable (a1, a2, a3)
instance (Hashable a1, Hashable a2) => Hashable (a1, a2)
instance (Hashable a, Hashable b) => Hashable (Either a b)
instance Hashable a => Hashable (Maybe a)
instance Hashable Char
instance Hashable Word64
instance Hashable Word32
instance Hashable Word16
instance Hashable Word8
instance Hashable Word
instance Hashable Int64
instance Hashable Int32
instance Hashable Int16
instance Hashable Int8
instance Hashable Int
instance Hashable Bool
instance Hashable ()