talira

hashable

A Haskell class for types that can be hashed

open sourceBSD-3-Clausefree

hashable is the Haskell package that defines the Hashable class, for types that can be converted to a hash value, for the benefit of hashing-based data structures such as unordered-containers' HashMap and HashSet. It provides instances for the basic types and a way to combine hash values. It is meant only for in-memory data structures: its hashes have no fixed standard and can change between versions. BSD-3-Clause licensed, maintained by Oleg Grenrus.

Problems it solves

  • use my own Haskell data type as a key in a HashMap
  • derive or write a hash function for a Haskell record
  • hash values for an in-memory hash table in Haskell

Features

  • Hashable type class for Haskell
  • instances for base types
  • combine hash values for your own types
  • used by HashMap and HashSet

Alternatives

The same job

These do what hashable does.

  1. cryptohash-sha256 Fast, pure and practical SHA-256 for Haskell

Compare hashable with the top 3