diff options
author | Daniel Burrows <dburrows@debian.org> | 2009-04-03 07:55:20 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2009-04-03 07:55:20 -0700 |
commit | 0115114455dec3c50e7d9221f42ddf56ad6450c9 (patch) | |
tree | a6b4e5cf069ed3751889002415b4c03836d068f6 /tools | |
parent | 47a8ba0e2387f0eb1a5c45008f72c0d2f8c82536 (diff) | |
download | aptitude-0115114455dec3c50e7d9221f42ddf56ad6450c9.tar.gz |
Add a convenience routine to make an attributeless digraph.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/resolver-visualize/Dot.hs | 7 |
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..]] |