| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Generics.Fixplate.Util.Hash.Class
Description
Haskell98 polymorphic Hash interface
- class (Eq hash, Ord hash, Hashable hash) => HashValue hash where
- hashWord8 :: Word8 -> hash -> hash
- hashWord16 :: Word16 -> hash -> hash
- hashWord32 :: Word32 -> hash -> hash
- hashWord64 :: Word64 -> hash -> hash
- emptyHash :: hash
- hashHash :: hash -> hash -> hash
- showHex :: hash -> String
- class Hashable a where
- hashDigest :: HashValue hash => a -> hash -> hash
- computeHash :: HashValue hash => a -> hash
- hashInt :: HashValue hash => Int -> hash -> hash
- hashWord :: HashValue hash => Word -> hash -> hash
- hashBool :: HashValue hash => Bool -> hash -> hash
- hashChar :: HashValue hash => Char -> hash -> hash
Documentation
class (Eq hash, Ord hash, Hashable hash) => HashValue hash where Source
Methods
hashWord8 :: Word8 -> hash -> hash Source
hashWord16 :: Word16 -> hash -> hash Source
hashWord32 :: Word32 -> hash -> hash Source
hashWord64 :: Word64 -> hash -> hash Source
A type class of hashable objects. An instance has to compute the hash for any hash function, using the "base" types (eg. Word32).
Minimal complete definition: hashDigest. The default for computeHash is
computeHash x = hashDigest x emptyHash
Minimal complete definition
Methods
hashDigest :: HashValue hash => a -> hash -> hash Source
computeHash :: HashValue hash => a -> hash Source
Instances
| Hashable Bool Source | |
| Hashable Char Source | |
| Hashable Int Source | |
| Hashable Word Source | |
| Hashable Word8 Source | |
| Hashable Word16 Source | |
| Hashable Word32 Source | |
| Hashable Word64 Source | |
| Hashable FNV32 Source | |
| Hashable FNV64 Source | |
| Hashable a => Hashable [a] Source | |
| (Hashable a, Hashable b) => Hashable (a, b) Source | |
| (Hashable a, Hashable b, Hashable c) => Hashable (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 e) => Hashable (a, b, c, d, e) Source |