summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2009-04-03 07:55:20 -0700
committerDaniel Burrows <dburrows@debian.org>2009-04-03 07:55:20 -0700
commit0115114455dec3c50e7d9221f42ddf56ad6450c9 (patch)
treea6b4e5cf069ed3751889002415b4c03836d068f6 /tools
parent47a8ba0e2387f0eb1a5c45008f72c0d2f8c82536 (diff)
downloadaptitude-0115114455dec3c50e7d9221f42ddf56ad6450c9.tar.gz
Add a convenience routine to make an attributeless digraph.
Diffstat (limited to 'tools')
-rw-r--r--tools/resolver-visualize/Dot.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/resolver-visualize/Dot.hs b/tools/resolver-visualize/Dot.hs
index 4072e67e..b0b056d1 100644
--- a/tools/resolver-visualize/Dot.hs
+++ b/tools/resolver-visualize/Dot.hs
@@ -8,7 +8,7 @@ module Dot(
AttributeValue, Attributed,
Name(), AttrValue(),
name, attrValue,
- node, edge,
+ node, edge, digraph,
genNodes
)
where
@@ -85,6 +85,11 @@ edge from to = Edge { edgeFrom = from,
edgeTo = to,
edgeAttributes = Map.empty }
+digraph :: [Node] -> [Edge] -> Digraph
+digraph nodes edges = Digraph { digraphNodes = nodes,
+ digraphEdges = edges,
+ digraphAttributes = Map.empty }
+
-- | An infinite list of nodes with arbitrary names.
genNodes = [node (name $ "node" ++ show n) | n <- [1..]]