hashabler: Principled, portable & extensible hashing of data and types, including an implementation of the FNV-1a and SipHash algorithms.

[ bsd3, data, library ] [ Propose Tags ]

This package is a rewrite of the hashable library by Milan Straka and Johan Tibell, having the following goals:

  • Extensibility; it should be easy to implement a new hashing algorithm on any Hashable type; in this package we provide SipHash and FNV-1a.

  • Honest hashing of values, and principled hashing of algebraic data types (see e.g. hashable issues #74 and #30)

  • Cross-platform consistent hash values, with a versioning guarantee. Where possible we ensure morally identical data hashes to indentical values regardless of processor word size and endianness.

  • Make implementing identical hash routines in other languages as painless as possible. In addition to SipHash, we provide an implementation of a simple hashing algorithm (FNV-1a) and make an effort to define Hashable instances in a way that is well-documented and sensible, so that e.g. one can easily implement a string hashing routine in JavaScript that will match the way we hash strings here.

Versioning: Except for instances where we specifically note that we make no promise of consistency, changes to hash values (and consequently changes to StableHashable values, where applicable) entail a major version number bump.

Modules

[Index]

Flags

Manual Flags

NameDescriptionDefault
dev

To build tests, executables and benchmarks do `configure -fdev --enable-tests` and run the built executables by hand (i.e. not with `cabal test` etc.; we put all our different executables in test-suite sections in order to hide their dependencies from hackage)

Disabled
instrumented

Enables assertions in library code. When --enable-library-profiling and --enable-executable-profiling is turned on, you can get stacktraces as well

Disabled
Automatic Flags
NameDescriptionDefault
integer-gmp

Are we using integer-gmp to provide fast Integer instances? This is ignored when using ghcjs

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 1.0, 1.1, 1.2, 1.2.1, 1.3.0, 2.0.0
Change log CHANGELOG.markdown
Dependencies array (>=0.4), base (>=4.6 && <4.10), bytestring, ghc-prim, integer-gmp (>=0.2), primitive, template-haskell, text (>=1.1.1.3), transformers [details]
License BSD-3-Clause
Author Brandon Simmons
Maintainer brandon.m.simmons@gmail.com
Revised Revision 2 made by HerbertValerioRiedel at 2017-06-03T16:58:44Z
Category Data
Home page https://github.com/jberryman/hashabler
Source repo head: git clone https://github.com/jberryman/hashabler.git
Uploaded by BrandonSimmons at 2016-11-20T03:06:19Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 8798 total (24 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-11-20 [all 1 reports]