From b37da38d3911bbc8381a39fe526e69599d9ddcf1 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Tue, 12 Apr 2011 10:09:03 +0200 Subject: Major refactoring of identifiers/resources/groups --- src/Hakyll/Core/DirectedGraph/Dot.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Hakyll/Core/DirectedGraph/Dot.hs') 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 -- cgit v1.2.3