HORIZON HASKELLDocslts/ghc-9.14.xb9228482026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · b922848 · 2026-10-12

Moduleghc-9.14.1GHC2021

GHC.Data.UnionFind

Synopsis
  • Packageghc-9.14.1
  • Exports9
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceUnionFind.hs
newtypenewtype Point s a

A variable which can be unified; alternately, this can be thought of as an equivalence class with a distinguished representative.

Constructors

Instances1Eq
  • Eq (Point s a)Defined in ghc-9.14.1 · GHC.Data.UnionFind
valuefresh :: a -> ST s (Point s a)

Create a fresh equivalence class with one element.

valuerepr :: Point s a -> ST s (Point s a)

Flatten any chains of links, returning a Point which points directly to the canonical representation.

valueunion :: Point s a -> Point s a -> ST s ()

Unify two equivalence classes, so that they share a canonical element. Keeps the descriptor of point2.