summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/DirectedGraph/Dot.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-04-12 10:09:03 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-04-12 10:09:03 +0200
commitb37da38d3911bbc8381a39fe526e69599d9ddcf1 (patch)
treed27f2dbf8860ddbdf0d791aff77dd8504ba6da92 /src/Hakyll/Core/DirectedGraph/Dot.hs
parent0a3cd37cc9635d2d1e6696bff91dcd37e81bd202 (diff)
downloadhakyll-b37da38d3911bbc8381a39fe526e69599d9ddcf1.tar.gz
Major refactoring of identifiers/resources/groups
Diffstat (limited to 'src/Hakyll/Core/DirectedGraph/Dot.hs')
-rw-r--r--src/Hakyll/Core/DirectedGraph/Dot.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Hakyll/Core/DirectedGraph/Dot.hs b/src/Hakyll/Core/DirectedGraph/Dot.hs
index 8289992..58f375c 100644
--- a/src/Hakyll/Core/DirectedGraph/Dot.hs
+++ b/src/Hakyll/Core/DirectedGraph/Dot.hs
@@ -16,11 +16,13 @@ toDot :: Ord a
-> String -- ^ Resulting string
toDot showTag graph = unlines $ concat
[ return "digraph dependencies {"
- , concatMap showNode (S.toList $ nodes graph)
+ , map showNode (S.toList $ nodes graph)
+ , concatMap showEdges (S.toList $ nodes graph)
, return "}"
]
where
- showNode node = map (showEdge node) $ S.toList $ neighbours node graph
+ showNode node = " \"" ++ showTag node ++ "\";"
+ showEdges node = map (showEdge node) $ S.toList $ neighbours node graph
showEdge x y = " \"" ++ showTag x ++ "\" -> \"" ++ showTag y ++ "\";"
-- | Write out the @.dot@ file to a given file path. See 'toDot' for more