License | BSD-style |
---|---|
Maintainer | Foundation |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
class Hashable a where Source #
Type with the ability to be hashed
Hashable doesn't have any specific rules, and it's made for raw speed. More specifically don't expect different type representing the same data to hash to the same value
hashMix (1 :: Integer) /= hashMix (1 :: Word8)
True
Hashable Int8 Source # | |
Hashable Int16 Source # | |
Hashable Int32 Source # | |
Hashable Int64 Source # | |
Hashable Integer Source # | |
Hashable Word8 Source # | |
Hashable Word16 Source # | |
Hashable Word32 Source # | |
Hashable Word64 Source # | |
Hashable Natural Source # | |
Hashable String Source # | |
Hashable a => Hashable [a] Source # | |
PrimType a => Hashable (UArray a) Source # | |
(Hashable a, Hashable b) => Hashable (a, b) Source # | |
(Hashable a, Hashable b) => Hashable (Tuple2 a b) Source # | |
(Hashable a, Hashable b, Hashable c) => Hashable (a, b, c) Source # | |
(Hashable a, Hashable b, Hashable c) => Hashable (Tuple3 a b c) Source # | |
(Hashable a, Hashable b, Hashable c, Hashable d) => Hashable (a, b, c, d) Source # | |
(Hashable a, Hashable b, Hashable c, Hashable d) => Hashable (Tuple4 a b c d) Source # | |
(Hashable a, Hashable b, Hashable c, Hashable d, Hashable e) => Hashable (a, b, c, d, e) Source # | |
(Hashable a, Hashable b, Hashable c, Hashable d, Hashable e, Hashable f) => Hashable (a, b, c, d, e, f) Source # | |
Incremental Hashing state. Represent an hashing algorithm
the base primitive of this class is hashMix8
, append
mix a Word8 in the state
The class allow to define faster mixing function that works on bigger Word size and any unboxed array of any PrimType elements
hashNew, hashMix8, hashEnd