@@ -10,7 +10,7 @@ module Hakyll.Core.DirectedGraph.DependencySolver
10import Prelude
10import Prelude
11import qualified Prelude as P
11import qualified Prelude as P
12import Data.Set (Set)
12import Data.Set (Set)
13−import Data.Maybe (catMaybes)
13+import Data.Maybe (mapMaybe)
14import qualified Data.Map as M
14import qualified Data.Map as M
15import qualified Data.Set as S
15import qualified Data.Set as S
@@ -48,7 +48,7 @@ order temp stack set graph@(DirectedGraph graph')
48 -- Check which dependencies are still in the graph
48 -- Check which dependencies are still in the graph
49 let tag = nodeTag node
49 let tag = nodeTag node
50 deps = S.toList $ nodeNeighbours node
50 deps = S.toList $ nodeNeighbours node
51− unsatisfied = catMaybes $ map (flip M.lookup graph') deps
51+ unsatisfied = mapMaybe (`M.lookup` graph') deps
52 in case unsatisfied of
52 in case unsatisfied of
54 -- All dependencies for node are satisfied, we can return it and
54 -- All dependencies for node are satisfied, we can return it and
@@ -58,7 +58,7 @@ order temp stack set graph@(DirectedGraph graph')
59 -- There is at least one dependency left. We need to solve that
59 -- There is at least one dependency left. We need to solve that
60 -- one first...
60 -- one first...
61− (dep : _) -> if (nodeTag dep) `S.member` set
61+ (dep : _) -> if nodeTag dep `S.member` set
62 -- The dependency is already in our stack - cycle detected!
62 -- The dependency is already in our stack - cycle detected!
63 then cycleError
63 then cycleError
64 -- Continue with the dependency
64 -- Continue with the dependency