Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 1f2b142b9d2ef4849a6f5316fa1c5b12 > files > 1916

ghc-6.10.4-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>GraphOps</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_GraphOps.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>ghc-6.10.4: The GHC API</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>GraphOps</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>Basic operations on graphs.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3AaddNode"
>addNode</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; <A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdelNode"
>delNode</A
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k) =&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgetNode"
>getNode</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; k -&gt; <A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AlookupNode"
>lookupNode</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; k -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmodNode"
>modNode</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (<A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color) -&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Asize"
>size</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aunion"
>union</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AaddConflict"
>addConflict</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (k, cls) -&gt; (k, cls) -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdelConflict"
>delConflict</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AaddConflicts"
>addConflicts</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="UniqSet.html#t%3AUniqSet"
>UniqSet</A
> k -&gt; (k -&gt; cls) -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AaddCoalesce"
>addCoalesce</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (k, cls) -&gt; (k, cls) -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdelCoalesce"
>delCoalesce</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AaddExclusion"
>addExclusion</A
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> color) =&gt; k -&gt; (k -&gt; cls) -&gt; color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AaddPreference"
>addPreference</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (k, cls) -&gt; color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcoalesceNodes"
>coalesceNodes</A
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="../base/Data-Ord.html#t%3AOrd"
>Ord</A
> k, <A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> cls, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k) =&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="GraphBase.html#t%3ATriv"
>Triv</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; (k, k) -&gt; (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color, <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (k, k))</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcoalesceGraph"
>coalesceGraph</A
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="../base/Data-Ord.html#t%3AOrd"
>Ord</A
> k, <A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> cls, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k) =&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="GraphBase.html#t%3ATriv"
>Triv</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color, [(k, k)])</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfreezeNode"
>freezeNode</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfreezeOneInGraph"
>freezeOneInGraph</A
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k) =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color, <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfreezeAllInGraph"
>freezeAllInGraph</A
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k) =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AscanGraph"
>scanGraph</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (<A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; [<A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsetColor"
>setColor</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AvalidateGraph"
>validateGraph</A
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k, <A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> color) =&gt; <A HREF="Outputable.html#t%3ASDoc"
>SDoc</A
> -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AslurpNodeConflictCount"
>slurpNodeConflictCount</A
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="UniqFM.html#t%3AUniqFM"
>UniqFM</A
> (<A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
>, <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
>)</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:addNode"
><A NAME="v%3AaddNode"
></A
></A
><B
>addNode</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; <A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Add a node to the graph, linking up its edges
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:delNode"
><A NAME="v%3AdelNode"
></A
></A
><B
>delNode</B
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k) =&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color)</TD
></TR
><TR
><TD CLASS="doc"
>Delete a node and all its edges from the graph.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:getNode"
><A NAME="v%3AgetNode"
></A
></A
><B
>getNode</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; k -&gt; <A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Get a node from the graph, throwing an error if it's not there
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:lookupNode"
><A NAME="v%3AlookupNode"
></A
></A
><B
>lookupNode</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; k -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color)</TD
></TR
><TR
><TD CLASS="doc"
>Lookup a node from the graph.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:modNode"
><A NAME="v%3AmodNode"
></A
></A
><B
>modNode</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (<A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color) -&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color)</TD
></TR
><TR
><TD CLASS="doc"
>Modify a node in the graph.
	returns Nothing if the node isn't present.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:size"
><A NAME="v%3Asize"
></A
></A
><B
>size</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="doc"
>Get the size of the graph, O(n)
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:union"
><A NAME="v%3Aunion"
></A
></A
><B
>union</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Union two graphs together.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:addConflict"
><A NAME="v%3AaddConflict"
></A
></A
><B
>addConflict</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (k, cls) -&gt; (k, cls) -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Add a conflict between nodes to the graph, creating the nodes required.
	Conflicts are virtual regs which need to be colored differently.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:delConflict"
><A NAME="v%3AdelConflict"
></A
></A
><B
>delConflict</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color)</TD
></TR
><TR
><TD CLASS="doc"
>Delete a conflict edge. k1 -&gt; k2
	returns Nothing if the node isn't in the graph
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:addConflicts"
><A NAME="v%3AaddConflicts"
></A
></A
><B
>addConflicts</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; <A HREF="UniqSet.html#t%3AUniqSet"
>UniqSet</A
> k -&gt; (k -&gt; cls) -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Add some conflicts to the graph, creating nodes if required.
	All the nodes in the set are taken to conflict with each other.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:addCoalesce"
><A NAME="v%3AaddCoalesce"
></A
></A
><B
>addCoalesce</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (k, cls) -&gt; (k, cls) -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Add a coalescence edge to the graph, creating nodes if requried.
	It is considered adventageous to assign the same color to nodes in a coalesence.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:delCoalesce"
><A NAME="v%3AdelCoalesce"
></A
></A
><B
>delCoalesce</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; k -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color)</TD
></TR
><TR
><TD CLASS="doc"
>Delete a coalescence edge (k1 -&gt; k2) from the graph.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:addExclusion"
><A NAME="v%3AaddExclusion"
></A
></A
><B
>addExclusion</B
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> color) =&gt; k -&gt; (k -&gt; cls) -&gt; color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Add an exclusion to the graph, creating nodes if required.
	These are extra colors that the node cannot use.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:addPreference"
><A NAME="v%3AaddPreference"
></A
></A
><B
>addPreference</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (k, cls) -&gt; color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Add a color preference to the graph, creating nodes if required.
	The most recently added preference is the most prefered.
	The algorithm tries to assign a node it's prefered color if possible.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:coalesceNodes"
><A NAME="v%3AcoalesceNodes"
></A
></A
><B
>coalesceNodes</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="../base/Data-Ord.html#t%3AOrd"
>Ord</A
> k, <A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> cls, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k)</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="rdoc"
>If True, coalesce nodes even if this might make the graph
	less colorable (aggressive coalescing)
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="GraphBase.html#t%3ATriv"
>Triv</A
> k cls color</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>-&gt; (k, k)</TD
><TD CLASS="rdoc"
>keys of the nodes to be coalesced
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color, <A HREF="../base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> (k, k))</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
><P
>Coalesce this pair of nodes unconditionally / agressively.
	The resulting node is the one with the least key.
</P
><P
>returns: Just 	 the pair of keys if the nodes were coalesced
			 the second element of the pair being the least one
</P
><P
>Nothing if either of the nodes weren't in the graph
</P
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:coalesceGraph"
><A NAME="v%3AcoalesceGraph"
></A
></A
><B
>coalesceGraph</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="../base/Data-Ord.html#t%3AOrd"
>Ord</A
> k, <A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> cls, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k)</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="rdoc"
>If True, coalesce nodes even if this might make the graph
	less colorable (aggressive coalescing)
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="GraphBase.html#t%3ATriv"
>Triv</A
> k cls color</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>-&gt; (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color, [(k, k)])</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Do agressive coalescing on this graph.
	returns	the new graph and the list of pairs of nodes that got coaleced together.
	for each pair, the resulting node will have the least key and be second in the pair.
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:freezeNode"
><A NAME="v%3AfreezeNode"
></A
></A
><B
>freezeNode</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; k</TD
><TD CLASS="rdoc"
>key of the node to freeze
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
><TD CLASS="rdoc"
>the graph
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
><TD CLASS="rdoc"
>graph with that node frozen
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Freeze a node
	This is for the iterative coalescer.
	By freezing a node we give up on ever coalescing it.
	Move all its coalesce edges into the frozen set - and update
	back edges from other nodes.
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:freezeOneInGraph"
><A NAME="v%3AfreezeOneInGraph"
></A
></A
><B
>freezeOneInGraph</B
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k) =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; (<A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color, <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>)</TD
></TR
><TR
><TD CLASS="doc"
><P
>Freeze one node in the graph
	This if for the iterative coalescer.
	Look for a move related node of low degree and freeze it.
</P
><P
>We probably don't need to scan the whole graph looking for the node of absolute
	lowest degree. Just sample the first few and choose the one with the lowest 
	degree out of those. Also, we don't make any distinction between conflicts of different
	classes.. this is just a heuristic, after all.
</P
><P
>IDEA:	freezing a node might free it up for Simplify.. would be good to check for triv
		right here, and add it to a worklist if known triv/non-move nodes.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:freezeAllInGraph"
><A NAME="v%3AfreezeAllInGraph"
></A
></A
><B
>freezeAllInGraph</B
> :: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k) =&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Freeze all the nodes in the graph
	for debugging the iterative allocator.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:scanGraph"
><A NAME="v%3AscanGraph"
></A
></A
><B
>scanGraph</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; (<A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; [<A HREF="GraphBase.html#t%3ANode"
>Node</A
> k cls color]</TD
></TR
><TR
><TD CLASS="doc"
>Find all the nodes in the graph that meet some criteria
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:setColor"
><A NAME="v%3AsetColor"
></A
></A
><B
>setColor</B
> :: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k =&gt; k -&gt; color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color -&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
></TR
><TR
><TD CLASS="doc"
>Set the color of a certain node
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:validateGraph"
><A NAME="v%3AvalidateGraph"
></A
></A
><B
>validateGraph</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: (<A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k, <A HREF="Outputable.html#t%3AOutputable"
>Outputable</A
> k, <A HREF="../base/Data-Eq.html#t%3AEq"
>Eq</A
> color)</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; <A HREF="Outputable.html#t%3ASDoc"
>SDoc</A
></TD
><TD CLASS="rdoc"
>extra debugging info to display on error
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="rdoc"
>whether this graph is supposed to be colored.
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
><TD CLASS="rdoc"
>graph to validate
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
><TD CLASS="rdoc"
>validated graph
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>validate the internal structure of a graph
	all its edges should point to valid nodes
	If they don't then throw an error
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:slurpNodeConflictCount"
><A NAME="v%3AslurpNodeConflictCount"
></A
></A
><B
>slurpNodeConflictCount</B
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="Unique.html#t%3AUniquable"
>Uniquable</A
> k</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; <A HREF="GraphBase.html#t%3AGraph"
>Graph</A
> k cls color</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="UniqFM.html#t%3AUniqFM"
>UniqFM</A
> (<A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
>, <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
>)</TD
><TD CLASS="rdoc"
>(conflict neighbours, num nodes with that many conflicts)
</TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Slurp out a map of how many nodes had a certain number of conflict neighbours
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.2</TD
></TR
></TABLE
></BODY
></HTML
>