unification-fd-0.9.0: Simple generic unification algorithms.

Portabilitysemi-portable (Rank2Types, MPTCs,...)
Stabilityhighly experimental
Maintainerwren@community.haskell.org
Safe HaskellNone

Control.Unification.Ranked.STVar

Description

A ranked variant of Control.Unification.STVar.

Synopsis

Documentation

data STRVar s t Source

A ranked unification variable implemented by STRefs. In addition to the STRef for the term itself, we also track the variable's ID (to support visited-sets) and rank (to support weighted path compression).

Instances

data STRBinding s a Source

A monad for handling STRVar bindings.

runSTRBinding :: (forall s. STRBinding s a) -> aSource

Run the ST ranked binding monad. N.B., because STRVar are rank-2 quantified, this guarantees that the return value has no such references. However, in order to remove the references from terms, you'll need to explicitly apply the bindings.