-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Combinators for building fast hashing functions. -- -- Combinators for building fast hashing functions. Includes hashing -- functions for all basic Haskell98 types. @package data-hash @version 0.1.0.0 -- | Combinators for building fast hashing functions. -- -- Based on the BuzHash algorithm by Robert Uzgalis (see, e.g. "Hashing -- concepts and the Java programming language" at -- http://www.serve.net/buz/hash.adt/java.000.html) module Data.Hash -- | A 64-bit hash data Hash asWord64 :: Hash -> Word64 hashWord8 :: Word8 -> Hash -- | h1 `combine` h2 combines hashes h1 and h2 -- into a new hash. -- -- It is used to generate hash functions for complex types. For example: -- --
--   hashPair :: (Hashable a, Hashable b) => (a,b) -> Hash
--   hashPair (a,b) = hash a `combine` hash b
--   
combine :: Hash -> Hash -> Hash hashWord16 :: Word16 -> Hash hashWord32 :: Word32 -> Hash hashWord64 :: Word64 -> Hash hashInt :: Int -> Hash -- | Observe that, unlike the other functions in this module, -- hashStorable is machine-dependent (the computed hash depends -- on endianness, etc.). hashStorable :: Storable a => a -> Hash hashFoldable :: (Foldable t, Hashable a) => t a -> Hash class Hashable a hash :: Hashable a => a -> Hash