summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/DirectedGraph
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-01-07 19:17:14 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-01-07 19:17:14 +0100
commitd0939102bf26ed81b4e57dc96f44e5330913ab6f (patch)
treeb16923fe3bdd7cb22e8dc4a78ef28f1d4b32cb52 /src/Hakyll/Core/DirectedGraph
parentddb8ea219319f024df02bafe9ce2ed7d3a7ee41d (diff)
downloadhakyll-d0939102bf26ed81b4e57dc96f44e5330913ab6f.tar.gz
Metacompilers now work, todo: cleanup
Diffstat (limited to 'src/Hakyll/Core/DirectedGraph')
-rw-r--r--src/Hakyll/Core/DirectedGraph/ObsoleteFilter.hs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/Hakyll/Core/DirectedGraph/ObsoleteFilter.hs b/src/Hakyll/Core/DirectedGraph/ObsoleteFilter.hs
deleted file mode 100644
index 9aeb2ff..0000000
--- a/src/Hakyll/Core/DirectedGraph/ObsoleteFilter.hs
+++ /dev/null
@@ -1,27 +0,0 @@
--- | Module exporting a function that works as a filter on a dependency graph.
--- Given a list of obsolete nodes, this filter will reduce the graph so it only
--- contains obsolete nodes and nodes that depend (directly or indirectly) on
--- obsolete nodes.
---
-module Hakyll.Core.DirectedGraph.ObsoleteFilter
- ( filterObsolete
- ) where
-
-import Data.Set (Set)
-import qualified Data.Set as S
-
-import Hakyll.Core.DirectedGraph
-import qualified Hakyll.Core.DirectedGraph as DG
-
--- | Given a list of obsolete items, filter the dependency graph so it only
--- contains these items
---
-filterObsolete :: Ord a
- => Set a -- ^ Obsolete items
- -> DirectedGraph a -- ^ Dependency graph
- -> DirectedGraph a -- ^ Resulting dependency graph
-filterObsolete obsolete graph =
- let reversed = DG.reverse graph
- allObsolete = S.unions $ map (flip reachableNodes reversed)
- $ S.toList obsolete
- in DG.filter (`S.member` allObsolete) graph