intern

Efficient hash-consing for arbitrary data types

http://github.com/ekmett/intern/

Version on this page:0.9.1.4
LTS Haskell 22.14:0.9.5@rev:1
Stackage Nightly 2024-03-28:0.9.5@rev:1
Latest on Hackage:0.9.5@rev:1

See all snapshots intern appears in

BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:intern-0.9.1.4@sha256:f7f607f7e9a603662356e26ff5b4fe339c214dd755f7109fa037afa3d11c3107,2324
Used by 1 package in nightly-2018-02-11(full list with versions):

Changes from 0.8 to 0.9

  • Removed identity from the Interned class, to support applications where the identity is obtained by other means (e.g. a unique Ptr value)

Changes from 0.7 to 0.8

  • Disabled cache removal as it was causing problems on large data sets. There is no good way to ensure that both references remain alive long enough to finish comparisons.

  • Switched to IORef from MVar

Changes from 0.6 to 0.7

  • Fixed problem where comparisons could happen between data structures while one was still a thunk, leading to equal structures comparing as inequal in limited circumstances, by appropriately using strictness annotations.

Efficient hash-consing for arbitrary data types

Changes from 0.5.2 to 0.6

  • Widened the caches so they don't go through a single MVar per type. This has made a dramatic impact on performance. However, this broke the previous invariant that newer entries always had higher Ids than older entries.

Changes from 0.5.1 to 0.5.2

  • Added Data.Interned.IntSet