diff options
Diffstat (limited to 'src/Hakyll/Core/DirectedGraph')
-rw-r--r-- | src/Hakyll/Core/DirectedGraph/Dot.hs | 6 |
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 |