Hash — Hash values

Hash (type)

Hash values represent a string of hash bits, packed into a Word32.

type Hash = Word32;

length

The hash length, always 31.

length : Nat

hashOfInt

hashOfInt : Int -> Hash

hashOfIntAcc

This only hashes the lowest 32 bits of the Int
hashOfIntAcc : (Hash, Int) -> Hash

hashOfText

This only hashes the lowest 32 bits of the Int
hashOfText : Text -> Hash

getHashBit

Project a given bit from the bit vector.

getHashBit : (Hash, Nat) -> Bool

hashEq

Test if two hashes are equal

hashEq : (Hash, Hash) -> Bool

bitsPrintRev

bitsPrintRev : Hash -> ()

hashPrintRev

hashPrintRev : Hash -> ()

hashWord8s

The input type should actually be [Word8]. Note: Be sure to explode each Word8 of a Word32 into its own Word32, and to shift into lower 8 bits.

hashWord8s : [Hash] -> Hash