syntax-tree-0.1.0.1: Typed ASTs
AST.Unify.Lookup
Description
Union-find lookup of unification variables
semiPruneLookup :: Unify m t => Tree (UVarOf m) t -> m (Tree (UVarOf m) t, Tree (UTerm (UVarOf m)) t) Source #
Look up a variable, and return last variable pointing to result. Prunes all variables on way to point to the last variable (path-compression ala union-find).