BSD-3-Clause licensed and maintained by Thomas Schilling
This version can be pinned in stack with:union-find-0.2@sha256:1fb8f475073188ad8f9020740300bdc66ede077bbd952f9bd98035e43e9efc47,1311

Module documentation for 0.2

Used by 1 package in lts-20.10(full list with versions):

union-find

A simple Haskell library that implements Tarjan’s Union/Find algorithm. Useful, for example, to implement unification in a type inference system.

The Union/Find algorithm implements these operations in (effectively) constant-time:

  1. Check whether two elements are in the same equivalence class.

  2. Create a union of two equivalence classes.

  3. Look up the descriptor of the equivalence class.

Installation

Using cabal (which comes with the Haskell Platform):

$ cabal install union-find

or in the checked-out repository:

$ cabal install