diff options
Diffstat (limited to 'src/Hakyll/Core/DirectedGraph.hs')
-rw-r--r-- | src/Hakyll/Core/DirectedGraph.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Hakyll/Core/DirectedGraph.hs b/src/Hakyll/Core/DirectedGraph.hs index 66905f7..a81868e 100644 --- a/src/Hakyll/Core/DirectedGraph.hs +++ b/src/Hakyll/Core/DirectedGraph.hs @@ -65,12 +65,12 @@ reachableNodes set graph = reachable (setNeighbours set) set sanitize' = S.filter (`S.notMember` visited) neighbours' = setNeighbours (sanitize' next) - setNeighbours = S.unions . map (flip neighbours graph) . S.toList + setNeighbours = S.unions . map (`neighbours` graph) . S.toList -- | Remove all dangling pointers, i.e. references to notes that do -- not actually exist in the graph. -- sanitize :: Ord a => DirectedGraph a -> DirectedGraph a -sanitize (DirectedGraph graph) = DirectedGraph $ M.map sanitize' $ graph +sanitize (DirectedGraph graph) = DirectedGraph $ M.map sanitize' graph where sanitize' (Node t n) = Node t $ S.filter (`M.member` graph) n |