summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/DirectedGraph
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-11-19 15:52:51 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2012-11-19 15:52:51 +0100
commitb1f70c339e031c1f6abf04ff63566f2cb9757a07 (patch)
treeaa47c4720f03d91537a26cd88981da41606c3fad /src/Hakyll/Core/DirectedGraph
parent802742cdbed1bb0afa022e072621e621d21158f6 (diff)
downloadhakyll-b1f70c339e031c1f6abf04ff63566f2cb9757a07.tar.gz
Support old directory versions...
Diffstat (limited to 'src/Hakyll/Core/DirectedGraph')
-rw-r--r--src/Hakyll/Core/DirectedGraph/Dot.hs36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/Hakyll/Core/DirectedGraph/Dot.hs b/src/Hakyll/Core/DirectedGraph/Dot.hs
deleted file mode 100644
index 06198e4..0000000
--- a/src/Hakyll/Core/DirectedGraph/Dot.hs
+++ /dev/null
@@ -1,36 +0,0 @@
---------------------------------------------------------------------------------
--- | Dump a directed graph in dot format. Used for debugging purposes
-module Hakyll.Core.DirectedGraph.Dot
- ( toDot
- , writeDot
- ) where
-
-
---------------------------------------------------------------------------------
-import qualified Data.Set as S
-import Hakyll.Core.DirectedGraph
-
-
---------------------------------------------------------------------------------
--- | Convert a directed graph into dot format for debugging purposes
-toDot :: Ord a
- => (a -> String) -- ^ Convert nodes to dot names
- -> DirectedGraph a -- ^ Graph to dump
- -> String -- ^ Resulting string
-toDot showTag graph = unlines $ concat
- [ return "digraph dependencies {"
- , map showNode (S.toList $ nodes graph)
- , concatMap showEdges (S.toList $ nodes graph)
- , return "}"
- ]
- where
- showNode node = " \"" ++ showTag node ++ "\";"
- showEdges node = map (showEdge node) $ neighbours node graph
- showEdge x y = " \"" ++ showTag x ++ "\" -> \"" ++ showTag y ++ "\";"
-
-
---------------------------------------------------------------------------------
--- | Write out the @.dot@ file to a given file path. See 'toDot' for more
--- information.
-writeDot :: Ord a => FilePath -> (a -> String) -> DirectedGraph a -> IO ()
-writeDot path showTag = writeFile path . toDot showTag