This file is indexed.

/usr/share/doc/libghc-graphviz-doc/html/Data-GraphViz.html is in libghc-graphviz-doc 2999.18.1.2-3build5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.GraphViz</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-GraphViz.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-GraphViz.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">graphviz-2999.18.1.2: Bindings to Graphviz for graph visualisation.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) Matthew Sackman Ivan Lazar Miljenovic</td></tr><tr><th>License</th><td>3-Clause BSD-style</td></tr><tr><th>Maintainer</th><td>Ivan.Miljenovic@gmail.com</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Data.GraphViz</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Conversion from graphs to <em>Dot</em> format.</a><ul><li><a href="#g:2">Specifying parameters.</a><ul><li><a href="#g:3">Specifying clusters.</a></li></ul></li><li><a href="#g:4">Converting graphs.</a></li><li><a href="#g:5">Pseudo-inverse conversion.</a></li></ul></li><li><a href="#g:6">Graph augmentation.</a><ul><li><a href="#g:7">Customisable augmentation.</a></li><li><a href="#g:8">Quick augmentation.</a></li><li><a href="#g:9">Manual augmentation.</a></li></ul></li><li><a href="#g:10">Utility functions</a></li><li><a href="#g:11">Re-exporting other modules.</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This is the top-level module for the graphviz library.  It provides
   functions to convert <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code>s into the
   <em>Dot</em> language used by the <em>Graphviz</em> suite of programs (as well as a
   limited ability to perform the reverse operation).</p><p>If you wish to construct a Haskell representation of a Dot graph
   yourself rather than using the conversion functions here, please
   see the <a href="Data-GraphViz-Types.html">Data.GraphViz.Types</a> module as a starting point for how to
   do so.</p><p>Information about Graphviz and the Dot language can be found at:
   <a href="http://graphviz.org/">http://graphviz.org/</a></p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:GraphvizParams">GraphvizParams</a> n nl el cl l = <a href="#v:Params">Params</a> {<ul class="subs"><li><a href="#v:isDirected">isDirected</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:globalAttributes">globalAttributes</a> :: [<a href="Data-GraphViz-Types-Canonical.html#t:GlobalAttributes">GlobalAttributes</a>]</li><li><a href="#v:clusterBy">clusterBy</a> :: (n, nl) -&gt; <a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> cl (n, l)</li><li><a href="#v:isDotCluster">isDotCluster</a> :: cl -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:clusterID">clusterID</a> :: cl -&gt; <a href="Data-GraphViz-Types-Canonical.html#t:GraphID">GraphID</a></li><li><a href="#v:fmtCluster">fmtCluster</a> :: cl -&gt; [<a href="Data-GraphViz-Types-Canonical.html#t:GlobalAttributes">GlobalAttributes</a>]</li><li><a href="#v:fmtNode">fmtNode</a> :: (n, l) -&gt; <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></li><li><a href="#v:fmtEdge">fmtEdge</a> :: (n, n, el) -&gt; <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></li></ul>}</li><li class="src short"><a href="#v:defaultParams">defaultParams</a> :: <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> n nl el cl nl</li><li class="src short"><a href="#v:nonClusteredParams">nonClusteredParams</a> :: <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> n nl el () nl</li><li class="src short"><a href="#v:blankParams">blankParams</a> :: <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> n nl el cl l</li><li class="src short"><a href="#v:setDirectedness">setDirectedness</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> el, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; (<a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; a) -&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; a</li><li class="src short"><span class="keyword">data</span> <a href="#t:NodeCluster">NodeCluster</a> c a<ul class="subs"><li>= <a href="#v:N">N</a> a</li><li>| <a href="#v:C">C</a> c (<a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> c a)</li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:LNodeCluster">LNodeCluster</a> cl l = <a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> cl (<a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>, l)</li><li class="src short"><a href="#v:graphToDot">graphToDot</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> cl, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; <a href="Data-GraphViz-Types-Canonical.html#t:DotGraph">DotGraph</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a></li><li class="src short"><a href="#v:graphElemsToDot">graphElemsToDot</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> cl, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> n) =&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> n nl el cl l -&gt; [(n, nl)] -&gt; [(n, n, el)] -&gt; <a href="Data-GraphViz-Types-Canonical.html#t:DotGraph">DotGraph</a> n</li><li class="src short"><a href="#v:dotToGraph">dotToGraph</a> :: (<a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a> dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> -&gt; gr <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a> <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:AttributeNode">AttributeNode</a> nl = (<a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a>, nl)</li><li class="src short"><span class="keyword">type</span> <a href="#t:AttributeEdge">AttributeEdge</a> el = (<a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a>, el)</li><li class="src short"><a href="#v:graphToGraph">graphToGraph</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> cl, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (gr (<a href="Data-GraphViz.html#t:AttributeNode">AttributeNode</a> nl) (<a href="Data-GraphViz.html#t:AttributeEdge">AttributeEdge</a> el))</li><li class="src short"><a href="#v:dotizeGraph">dotizeGraph</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> cl, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; gr (<a href="Data-GraphViz.html#t:AttributeNode">AttributeNode</a> nl) (<a href="Data-GraphViz.html#t:AttributeEdge">AttributeEdge</a> el)</li><li class="src short"><span class="keyword">data</span> <a href="#t:EdgeID">EdgeID</a> el</li><li class="src short"><a href="#v:addEdgeIDs">addEdgeIDs</a> :: <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr =&gt; gr nl el -&gt; gr nl (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el)</li><li class="src short"><a href="#v:setEdgeIDAttribute">setEdgeIDAttribute</a> :: (<a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:LEdge">LEdge</a> el -&gt; <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a>) -&gt; <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:LEdge">LEdge</a> (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el) -&gt; <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></li><li class="src short"><a href="#v:dotAttributes">dotAttributes</a> :: (<a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr, <a href="Data-GraphViz-Types.html#t:PPDotRepr">PPDotRepr</a> dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>, <a href="Data-GraphViz-Types-Generalised.html#t:FromGeneralisedDot">FromGeneralisedDot</a> dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; gr nl (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el) -&gt; dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (gr (<a href="Data-GraphViz.html#t:AttributeNode">AttributeNode</a> nl) (<a href="Data-GraphViz.html#t:AttributeEdge">AttributeEdge</a> el))</li><li class="src short"><a href="#v:augmentGraph">augmentGraph</a> :: (<a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr, <a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a> dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>) =&gt; gr nl (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el) -&gt; dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> -&gt; gr (<a href="Data-GraphViz.html#t:AttributeNode">AttributeNode</a> nl) (<a href="Data-GraphViz.html#t:AttributeEdge">AttributeEdge</a> el)</li><li class="src short"><a href="#v:preview">preview</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> el, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr, <a href="Data-GraphViz-Attributes.html#t:Labellable">Labellable</a> nl, <a href="Data-GraphViz-Attributes.html#t:Labellable">Labellable</a> el) =&gt; gr nl el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short">module <a href="Data-GraphViz-Types.html">Data.GraphViz.Types</a></li><li class="src short">module <a href="Data-GraphViz-Types-Canonical.html">Data.GraphViz.Types.Canonical</a></li><li class="src short">module <a href="Data-GraphViz-Attributes.html">Data.GraphViz.Attributes</a></li><li class="src short">module <a href="Data-GraphViz-Commands.html">Data.GraphViz.Commands</a></li></ul></div><div id="interface"><h1 id="g:1">Conversion from graphs to <em>Dot</em> format.</h1><h2 id="g:2">Specifying parameters.</h2><div class="doc"><p>A <code><a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a></code> value contains all the information necessary to
   manipulate <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code>s with this library.  As such, its components deal
   with:</p><ul><li>Whether to treat graphs as being directed or not;</li><li>Which top-level <code><a href="Data-GraphViz-Types-Canonical.html#t:GlobalAttributes">GlobalAttributes</a></code> values should be applied;</li><li>How to define (and name) clusters;</li><li>How to format clusters, nodes and edges.</li></ul><p>Apart from not having to pass multiple values around, another
   advantage of using <code><a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a></code> over the previous approach is that
   there is no distinction between clustering and non-clustering variants
   of the same functions.</p><p>Example usages of <code><a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a></code> follow:</p><ul><li>Quickly visualise a graph using the default parameters.  Note the
     usage of <code><code><a href="Data-GraphViz.html#v:nonClusteredParams">nonClusteredParams</a></code></code> over <code><code><a href="Data-GraphViz.html#v:defaultParams">defaultParams</a></code></code> to avoid
     type-checking problems with the cluster type.</li></ul><pre>defaultVis :: (Graph gr) =&gt; gr nl el -&gt; DotGraph Node
defaultVis = graphToDot nonClusteredParams</pre><ul><li>As with <code>defaultVis</code>, but determine whether or not the graph is
     directed or undirected.</li></ul><pre>checkDirectednessVis :: (Graph gr, Ord el) =&gt; gr nl el -&gt; DotGraph Node
checkDirectednessVis = setDirectedness graphToDot nonClusteredParams</pre><ul><li>Clustering nodes based upon whether they are even or odd.  We
     have the option of either constructing a <code>GraphvizParams</code>
     directly, or using <code><code><a href="Data-GraphViz.html#v:blankParams">blankParams</a></code></code>.  Using the latter to avoid
     setting <code><code><a href="Data-GraphViz.html#v:isDirected">isDirected</a></code></code>:</li></ul><pre>evenOdd :: (Graph gr, Ord el) =&gt; gr Int el -&gt; DotGraph Node
evenOdd = setDirectedness graphToDot params
  where
    params = blankParams { globalAttributes = []
                         , clusterBy        = clustBy
                         , clusterID        = Num . Int
                         , fmtCluster       = clFmt
                         , fmtNode          = const []
                         , fmtEdge          = const []
                         }
    clustBy (n,l) = C (n `mod` 2) $ N (n,l)
    clFmt m = [GraphAttrs [toLabel $ &quot;n == &quot; ++ show m ++ &quot; (mod 2)&quot;]]</pre><p>For more examples, see the source of <code><a href="Data-GraphViz.html#v:dotizeGraph">dotizeGraph</a></code> and <code><a href="Data-GraphViz.html#v:preview">preview</a></code>.</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:GraphvizParams" class="def">GraphvizParams</a> n nl el cl l <a href="src/Data-GraphViz.html#GraphvizParams" class="link">Source</a> <a href="#t:GraphvizParams" class="selflink">#</a></p><div class="doc"><p>Defines the parameters used to convert a <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code> into a <code><a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a></code>.</p><p>A value of type <code><code><a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a></code> n nl el cl l</code> indicates that
   the <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code> has a node type of <code>n</code>, node labels of type <code>nl</code>,
   edge labels of type <code>el</code>, corresponding clusters of type <code>cl</code> and
   after clustering the nodes have a label of type <code>l</code> (which may or
   may not be the same as <code>nl</code>).</p><p>The tuples in the function types represent labelled nodes (for
   <code>(n,nl)</code> and <code>(n,l)</code>) and labelled edges (<code>(n,n,el)</code>; the value
   <code>(f,t,ftl)</code> is an edge from <code>f</code> to <code>l</code> with a label of <code>ftl</code>).
   These correspond to <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:LNode">LNode</a></code> and <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:LEdge">LEdge</a></code> in FGL graphs.</p><p>The clustering in <code><a href="Data-GraphViz.html#v:clusterBy">clusterBy</a></code> can be to arbitrary depth.</p><p>Note that the term &quot;cluster&quot; is slightly conflated here: in
   terms of <code>GraphvizParams</code> values, a cluster is a grouping of
   nodes; the <code><a href="Data-GraphViz.html#v:isDotCluster">isDotCluster</a></code> function lets you specify whether it is
   a cluster in the Dot sense or just a sub-graph.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Params" class="def">Params</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:isDirected" class="def">isDirected</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p><code>True</code> if the graph is directed; <code>False</code>
   otherwise.</p></div></li><li><dfn class="src"><a id="v:globalAttributes" class="def">globalAttributes</a> :: [<a href="Data-GraphViz-Types-Canonical.html#t:GlobalAttributes">GlobalAttributes</a>]</dfn><div class="doc"><p>The top-level global <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></code> for the entire
   graph.</p></div></li><li><dfn class="src"><a id="v:clusterBy" class="def">clusterBy</a> :: (n, nl) -&gt; <a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> cl (n, l)</dfn><div class="doc"><p>A function to specify which cluster a particular
   node is in.</p></div></li><li><dfn class="src"><a id="v:isDotCluster" class="def">isDotCluster</a> :: cl -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Is this &quot;cluster&quot; actually a cluster, or just a
   sub-graph?</p></div></li><li><dfn class="src"><a id="v:clusterID" class="def">clusterID</a> :: cl -&gt; <a href="Data-GraphViz-Types-Canonical.html#t:GraphID">GraphID</a></dfn><div class="doc"><p>The name/identifier for a cluster.</p></div></li><li><dfn class="src"><a id="v:fmtCluster" class="def">fmtCluster</a> :: cl -&gt; [<a href="Data-GraphViz-Types-Canonical.html#t:GlobalAttributes">GlobalAttributes</a>]</dfn><div class="doc"><p>Specify which global attributes are applied in
   the given cluster.</p></div></li><li><dfn class="src"><a id="v:fmtNode" class="def">fmtNode</a> :: (n, l) -&gt; <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></dfn><div class="doc"><p>The specific <code>Attributes</code> for a node.</p></div></li><li><dfn class="src"><a id="v:fmtEdge" class="def">fmtEdge</a> :: (n, n, el) -&gt; <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></dfn><div class="doc"><p>The specific <code>Attributes</code> for an edge.</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><a id="v:defaultParams" class="def">defaultParams</a> :: <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> n nl el cl nl <a href="src/Data-GraphViz.html#defaultParams" class="link">Source</a> <a href="#v:defaultParams" class="selflink">#</a></p><div class="doc"><p>A default <code><a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a></code> value which assumes the graph is
   directed, contains no clusters and has no <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attribute">Attribute</a></code>s set.</p><p>If you wish to have the labels of the nodes to have a different
   type after applying <code><a href="Data-GraphViz.html#v:clusterBy">clusterBy</a></code> from before clustering, then you
   will have to specify your own <code><a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a></code> value from
   scratch (or use <code><a href="Data-GraphViz.html#v:blankParams">blankParams</a></code>).</p><p>If you use a custom <code><a href="Data-GraphViz.html#v:clusterBy">clusterBy</a></code> function (which if you actually
   want clusters you should) then you should also override the
   (nonsensical) default <code><a href="Data-GraphViz.html#v:clusterID">clusterID</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:nonClusteredParams" class="def">nonClusteredParams</a> :: <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> n nl el () nl <a href="src/Data-GraphViz.html#nonClusteredParams" class="link">Source</a> <a href="#v:nonClusteredParams" class="selflink">#</a></p><div class="doc"><p>A variant of <code><a href="Data-GraphViz.html#v:defaultParams">defaultParams</a></code> that enforces that the clustering
   type is <code>'()'</code> (i.e.: no clustering); this avoids problems when
   using <code><a href="Data-GraphViz.html#v:defaultParams">defaultParams</a></code> internally within a function without any
   constraint on what the clustering type is.</p></div></div><div class="top"><p class="src"><a id="v:blankParams" class="def">blankParams</a> :: <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> n nl el cl l <a href="src/Data-GraphViz.html#blankParams" class="link">Source</a> <a href="#v:blankParams" class="selflink">#</a></p><div class="doc"><p>A <code><a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a></code> value where every field is set to
   <code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#v:undefined">undefined</a></code></code>.  This is useful when you have a function that will
   set some of the values for you (e.g. <code><a href="Data-GraphViz.html#v:setDirectedness">setDirectedness</a></code>) but you
   don't want to bother thinking of default values to set in the
   meantime.  This is especially useful when you are
   programmatically setting the clustering function (and as such do
   not know what the types might be).</p></div></div><div class="top"><p class="src"><a id="v:setDirectedness" class="def">setDirectedness</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> el, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; (<a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; a) -&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; a <a href="src/Data-GraphViz.html#setDirectedness" class="link">Source</a> <a href="#v:setDirectedness" class="selflink">#</a></p><div class="doc"><p>Determine if the provided <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code> is directed or not and set the
   value of <code><a href="Data-GraphViz.html#v:isDirected">isDirected</a></code> appropriately.</p></div></div><h3 id="g:3">Specifying clusters.</h3><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:NodeCluster" class="def">NodeCluster</a> c a <a href="src/Data-GraphViz-Algorithms-Clustering.html#NodeCluster" class="link">Source</a> <a href="#t:NodeCluster" class="selflink">#</a></p><div class="doc"><p>Define into which cluster a particular node belongs.
   Clusters can be nested to arbitrary depth.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:N" class="def">N</a> a</td><td class="doc"><p>Indicates the actual Node in the Graph.</p></td></tr><tr><td class="src"><a id="v:C" class="def">C</a> c (<a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> c a)</td><td class="doc"><p>Indicates that the
   <code><a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a></code> is in
   the Cluster <em>c</em>.</p></td></tr></table></div><div class="subs instances"><p id="control.i:NodeCluster" class="caption collapser" onclick="toggleSection('i:NodeCluster')">Instances</p><div id="section.i:NodeCluster" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:NodeCluster:Show:1" class="instance expander" onclick="toggleSection('i:id:NodeCluster:Show:1')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> c, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> c a)</span> <a href="src/Data-GraphViz-Algorithms-Clustering.html#line-31" class="link">Source</a> <a href="#t:NodeCluster" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:NodeCluster:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> c a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> c a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> c a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:LNodeCluster" class="def">LNodeCluster</a> cl l = <a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a> cl (<a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>, l) <a href="src/Data-GraphViz.html#LNodeCluster" class="link">Source</a> <a href="#t:LNodeCluster" class="selflink">#</a></p><div class="doc"><p>An alias for <code><a href="Data-GraphViz.html#t:NodeCluster">NodeCluster</a></code> when dealing with FGL graphs.</p></div></div><h2 id="g:4">Converting graphs.</h2><div class="top"><p class="src"><a id="v:graphToDot" class="def">graphToDot</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> cl, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; <a href="Data-GraphViz-Types-Canonical.html#t:DotGraph">DotGraph</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> <a href="src/Data-GraphViz.html#graphToDot" class="link">Source</a> <a href="#v:graphToDot" class="selflink">#</a></p><div class="doc"><p>Convert a graph to <em>Dot</em> format, using the specified parameters
   to cluster the graph, etc.</p></div></div><div class="top"><p class="src"><a id="v:graphElemsToDot" class="def">graphElemsToDot</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> cl, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> n) =&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> n nl el cl l -&gt; [(n, nl)] -&gt; [(n, n, el)] -&gt; <a href="Data-GraphViz-Types-Canonical.html#t:DotGraph">DotGraph</a> n <a href="src/Data-GraphViz.html#graphElemsToDot" class="link">Source</a> <a href="#v:graphElemsToDot" class="selflink">#</a></p><div class="doc"><p>As with <code><a href="Data-GraphViz.html#v:graphToDot">graphToDot</a></code>, but this allows you to easily convert other
   graph-like formats to a Dot graph as long as you can get a list
   of nodes and edges from it.</p></div></div><h2 id="g:5">Pseudo-inverse conversion.</h2><div class="top"><p class="src"><a id="v:dotToGraph" class="def">dotToGraph</a> :: (<a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a> dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> -&gt; gr <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a> <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a> <a href="src/Data-GraphViz.html#dotToGraph" class="link">Source</a> <a href="#v:dotToGraph" class="selflink">#</a></p><div class="doc"><p>A pseudo-inverse to <code><a href="Data-GraphViz.html#v:graphToDot">graphToDot</a></code>; &quot;pseudo&quot; in the sense that
   the original node and edge labels aren't able to be
   reconstructed.</p></div></div><h1 id="g:6">Graph augmentation.</h1><div class="doc"><p>The following functions provide support for passing a <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code>
   through the appropriate <code><a href="Data-GraphViz-Attributes-Complete.html#t:GraphvizCommand">GraphvizCommand</a></code> to augment the <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code> by
   adding positional information, etc.</p><p>A <code><a href="Data-GraphViz-Attributes-Complete.html#t:CustomAttribute">CustomAttribute</a></code> is used to distinguish multiple edges between
   two nodes from each other.</p><p>Note that the reason that most of these functions do not have
   <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO-Unsafe.html#v:unsafePerformIO">unsafePerformIO</a></code> applied to them is because if you set a global
   <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attribute">Attribute</a></code> of:</p><pre>   <code>Start</code> (<code>StartStyle</code> <code>RandomStyle</code>)
  </pre><p>then it will not necessarily be referentially transparent (ideally,
   no matter what the seed is, it will still eventually be drawn to the
   same optimum, but this can't be guaranteed).  As such, if you are sure
   that you're not using such an <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attribute">Attribute</a></code>, then you should be able to
   use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO-Unsafe.html#v:unsafePerformIO">unsafePerformIO</a></code> directly in your own code.</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:AttributeNode" class="def">AttributeNode</a> nl = (<a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a>, nl) <a href="src/Data-GraphViz.html#AttributeNode" class="link">Source</a> <a href="#t:AttributeNode" class="selflink">#</a></p><div class="doc"><p>Augment the current node label type with the <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></code> applied
   to that node.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:AttributeEdge" class="def">AttributeEdge</a> el = (<a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a>, el) <a href="src/Data-GraphViz.html#AttributeEdge" class="link">Source</a> <a href="#t:AttributeEdge" class="selflink">#</a></p><div class="doc"><p>Augment the current edge label type with the <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></code> applied
   to that edge.</p></div></div><h2 id="g:7">Customisable augmentation.</h2><div class="top"><p class="src"><a id="v:graphToGraph" class="def">graphToGraph</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> cl, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (gr (<a href="Data-GraphViz.html#t:AttributeNode">AttributeNode</a> nl) (<a href="Data-GraphViz.html#t:AttributeEdge">AttributeEdge</a> el)) <a href="src/Data-GraphViz.html#graphToGraph" class="link">Source</a> <a href="#v:graphToGraph" class="selflink">#</a></p><div class="doc"><p>Run the appropriate Graphviz command on the graph to get
   positional information and then combine that information back
   into the original graph.</p></div></div><h2 id="g:8">Quick augmentation.</h2><div class="top"><p class="src"><a id="v:dotizeGraph" class="def">dotizeGraph</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> cl, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr) =&gt; <a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a> <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> nl el cl l -&gt; gr nl el -&gt; gr (<a href="Data-GraphViz.html#t:AttributeNode">AttributeNode</a> nl) (<a href="Data-GraphViz.html#t:AttributeEdge">AttributeEdge</a> el) <a href="src/Data-GraphViz.html#dotizeGraph" class="link">Source</a> <a href="#v:dotizeGraph" class="selflink">#</a></p><div class="doc"><p>This is a &quot;quick-and-dirty&quot; graph augmentation function that
   sets no <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></code> and thus should be referentially transparent
   and is wrapped in <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO-Unsafe.html#v:unsafePerformIO">unsafePerformIO</a></code>.</p><p>Note that the provided <code><a href="Data-GraphViz.html#t:GraphvizParams">GraphvizParams</a></code> is only used for
   <code><a href="Data-GraphViz.html#v:isDirected">isDirected</a></code>, <code><a href="Data-GraphViz.html#v:clusterBy">clusterBy</a></code> and <code><a href="Data-GraphViz.html#v:clusterID">clusterID</a></code>.</p></div></div><h2 id="g:9">Manual augmentation.</h2><div class="doc"><p>This section allows you to manually augment graphs by providing
   fine-grained control over the augmentation process (the standard
   augmentation functions compose these together).  Possible reasons for
   manual augmentation are:</p><ul><li>Gain access to the intermediary <code><a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a></code> used.</li><li>Convert the default <code><a href="Data-GraphViz-Types-Canonical.html#t:DotGraph">DotGraph</a></code> to a <code>GDotGraph</code> (found in
     <a href="Data-GraphViz-Types-Generalised.html">Data.GraphViz.Types.Generalised</a>) so as to have greater control over
     the generated Dot code.</li><li>Use a specific <code><a href="Data-GraphViz-Attributes-Complete.html#t:GraphvizCommand">GraphvizCommand</a></code> rather than the default.</li></ul><p>Note that whilst these functions provide you with more control, you
   must be careful how you use them: if you use the wrong <code><a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a></code> for
   a <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code>, then the behaviour of <code><a href="Data-GraphViz.html#v:augmentGraph">augmentGraph</a></code> (and all functions
   that use it) is undefined.  The main point is to make sure that the
   defined <code><a href="Data-GraphViz-Types-Canonical.html#t:DotNode">DotNode</a></code> and <code><a href="Data-GraphViz-Types-Canonical.html#t:DotEdge">DotEdge</a></code> values aren't removed (or their ID
   values - or the <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></code> for the <code><a href="Data-GraphViz-Types-Canonical.html#t:DotEdge">DotEdge</a></code>s - altered) to
   ensure that it is possible to match up the nodes and edges in the
   <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code> with those in the <code><a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a></code>.</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:EdgeID" class="def">EdgeID</a> el <a href="src/Data-GraphViz.html#EdgeID" class="link">Source</a> <a href="#t:EdgeID" class="selflink">#</a></p><div class="doc"><p>Used to augment an edge label with a unique identifier.</p></div><div class="subs instances"><p id="control.i:EdgeID" class="caption collapser" onclick="toggleSection('i:EdgeID')">Instances</p><div id="section.i:EdgeID" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:EdgeID:Eq:1" class="instance expander" onclick="toggleSection('i:id:EdgeID:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> el =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el)</span> <a href="src/Data-GraphViz.html#line-418" class="link">Source</a> <a href="#t:EdgeID" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:EdgeID:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:EdgeID:Ord:2" class="instance expander" onclick="toggleSection('i:id:EdgeID:Ord:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> el =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el)</span> <a href="src/Data-GraphViz.html#line-418" class="link">Source</a> <a href="#t:EdgeID" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:EdgeID:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:EdgeID:Show:3" class="instance expander" onclick="toggleSection('i:id:EdgeID:Show:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> el =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el)</span> <a href="src/Data-GraphViz.html#line-418" class="link">Source</a> <a href="#t:EdgeID" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:EdgeID:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:addEdgeIDs" class="def">addEdgeIDs</a> :: <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr =&gt; gr nl el -&gt; gr nl (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el) <a href="src/Data-GraphViz.html#addEdgeIDs" class="link">Source</a> <a href="#v:addEdgeIDs" class="selflink">#</a></p><div class="doc"><p>Add unique edge identifiers to each label.  This is useful for
   when multiple edges between two nodes need to be distinguished.</p></div></div><div class="top"><p class="src"><a id="v:setEdgeIDAttribute" class="def">setEdgeIDAttribute</a> :: (<a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:LEdge">LEdge</a> el -&gt; <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a>) -&gt; <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:LEdge">LEdge</a> (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el) -&gt; <a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a> <a href="src/Data-GraphViz.html#setEdgeIDAttribute" class="link">Source</a> <a href="#v:setEdgeIDAttribute" class="selflink">#</a></p><div class="doc"><p>Add a custom attribute to the list of attributes containing the
   value of the unique edge identifier.</p></div></div><div class="top"><p class="src"><a id="v:dotAttributes" class="def">dotAttributes</a> :: (<a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr, <a href="Data-GraphViz-Types.html#t:PPDotRepr">PPDotRepr</a> dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>, <a href="Data-GraphViz-Types-Generalised.html#t:FromGeneralisedDot">FromGeneralisedDot</a> dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; gr nl (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el) -&gt; dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (gr (<a href="Data-GraphViz.html#t:AttributeNode">AttributeNode</a> nl) (<a href="Data-GraphViz.html#t:AttributeEdge">AttributeEdge</a> el)) <a href="src/Data-GraphViz.html#dotAttributes" class="link">Source</a> <a href="#v:dotAttributes" class="selflink">#</a></p><div class="doc"><p>Pass the <code><a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a></code> through the relevant command and then augment
   the <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code> that it came from.</p></div></div><div class="top"><p class="src"><a id="v:augmentGraph" class="def">augmentGraph</a> :: (<a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr, <a href="Data-GraphViz-Types.html#t:DotRepr">DotRepr</a> dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a>) =&gt; gr nl (<a href="Data-GraphViz.html#t:EdgeID">EdgeID</a> el) -&gt; dg <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Node">Node</a> -&gt; gr (<a href="Data-GraphViz.html#t:AttributeNode">AttributeNode</a> nl) (<a href="Data-GraphViz.html#t:AttributeEdge">AttributeEdge</a> el) <a href="src/Data-GraphViz.html#augmentGraph" class="link">Source</a> <a href="#v:augmentGraph" class="selflink">#</a></p><div class="doc"><p>Use the <code><a href="Data-GraphViz-Attributes-Complete.html#t:Attributes">Attributes</a></code> in the provided <code><a href="Data-GraphViz-Types-Canonical.html#t:DotGraph">DotGraph</a></code> to augment the
   node and edge labels in the provided <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code>.  The unique
   identifiers on the edges are also stripped off.</p><p>Please note that the behaviour for this function is undefined if
   the <code><a href="Data-GraphViz-Types-Canonical.html#t:DotGraph">DotGraph</a></code> does not come from the original <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a></code> (either
   by using a conversion function or by passing the result of a
   conversion function through a <code><a href="Data-GraphViz-Attributes-Complete.html#t:GraphvizCommand">GraphvizCommand</a></code> via the
   <code><a href="Data-GraphViz-Commands.html#v:DotOutput">DotOutput</a></code> or similar).</p></div></div><h1 id="g:10">Utility functions</h1><div class="top"><p class="src"><a id="v:preview" class="def">preview</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> el, <a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#t:Graph">Graph</a> gr, <a href="Data-GraphViz-Attributes.html#t:Labellable">Labellable</a> nl, <a href="Data-GraphViz-Attributes.html#t:Labellable">Labellable</a> el) =&gt; gr nl el -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-GraphViz.html#preview" class="link">Source</a> <a href="#v:preview" class="selflink">#</a></p><div class="doc"><p>Quickly visualise a graph using the <code><a href="Data-GraphViz-Commands.html#v:Xlib">Xlib</a></code> <code><a href="Data-GraphViz-Commands.html#t:GraphvizCanvas">GraphvizCanvas</a></code>.  If
   your label types are not (and cannot) be instances of <code><a href="Data-GraphViz-Attributes.html#t:Labellable">Labellable</a></code>,
   you may wish to use <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#v:gmap">gmap</a></code>, <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#v:nmap">nmap</a></code> or <code><a href="file:///usr/share/doc/libghc-fgl-doc/html/Data-Graph-Inductive-Graph.html#v:emap">emap</a></code> to set them to a value
   such as <code>&quot;&quot;</code>.</p></div></div><h1 id="g:11">Re-exporting other modules.</h1><div class="top"><p class="src">module <a href="Data-GraphViz-Types.html">Data.GraphViz.Types</a></p></div><div class="top"><p class="src">module <a href="Data-GraphViz-Types-Canonical.html">Data.GraphViz.Types.Canonical</a></p></div><div class="top"><p class="src">module <a href="Data-GraphViz-Attributes.html">Data.GraphViz.Attributes</a></p></div><div class="top"><p class="src">module <a href="Data-GraphViz-Commands.html">Data.GraphViz.Commands</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>