fixplate-0.1.6: Uniplate-style generic traversals for optionally annotated fixed-point types.

Safe HaskellSafe-Inferred



Haskell98 polymorphic Hash interface



class (Eq hash, Ord hash, Hashable hash) => HashValue hash where Source

A type class for hashes. Minimal complete definition: emptyHash, hashWord8, hashHash and showHex.

Minimal complete definition

hashWord8, emptyHash, hashHash, showHex


hashWord8 :: Word8 -> hash -> hash Source

hashWord16 :: Word16 -> hash -> hash Source

hashWord32 :: Word32 -> hash -> hash Source

hashWord64 :: Word64 -> hash -> hash Source

emptyHash :: hash Source

hashHash :: hash -> hash -> hash Source

showHex :: hash -> String Source

class Hashable a where 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



hashDigest :: HashValue hash => a -> hash -> hash Source

computeHash :: HashValue hash => a -> hash Source

hashInt :: HashValue hash => Int -> hash -> hash Source

hashWord :: HashValue hash => Word -> hash -> hash Source

hashBool :: HashValue hash => Bool -> hash -> hash Source

hashChar :: HashValue hash => Char -> hash -> hash Source