From b1f70c339e031c1f6abf04ff63566f2cb9757a07 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Mon, 19 Nov 2012 15:52:51 +0100 Subject: Support old directory versions... --- src/Hakyll/Core/DirectedGraph/Dot.hs | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/Hakyll/Core/DirectedGraph/Dot.hs (limited to 'src/Hakyll/Core/DirectedGraph') 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 -- cgit v1.2.3