From 6e7dc0e58fd2d7814934e0c041a4e18232102087 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Fri, 14 Jan 2011 08:50:34 +0100 Subject: Micro-cleanup --- src/Hakyll/Core/DirectedGraph/DependencySolver.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Hakyll/Core/DirectedGraph/DependencySolver.hs') diff --git a/src/Hakyll/Core/DirectedGraph/DependencySolver.hs b/src/Hakyll/Core/DirectedGraph/DependencySolver.hs index 214211b..54826ff 100644 --- a/src/Hakyll/Core/DirectedGraph/DependencySolver.hs +++ b/src/Hakyll/Core/DirectedGraph/DependencySolver.hs @@ -10,7 +10,7 @@ module Hakyll.Core.DirectedGraph.DependencySolver import Prelude import qualified Prelude as P import Data.Set (Set) -import Data.Maybe (catMaybes) +import Data.Maybe (mapMaybe) import qualified Data.Map as M import qualified Data.Set as S @@ -48,7 +48,7 @@ order temp stack set graph@(DirectedGraph graph') -- Check which dependencies are still in the graph let tag = nodeTag node deps = S.toList $ nodeNeighbours node - unsatisfied = catMaybes $ map (flip M.lookup graph') deps + unsatisfied = mapMaybe (`M.lookup` graph') deps in case unsatisfied of -- All dependencies for node are satisfied, we can return it and @@ -58,7 +58,7 @@ order temp stack set graph@(DirectedGraph graph') -- There is at least one dependency left. We need to solve that -- one first... - (dep : _) -> if (nodeTag dep) `S.member` set + (dep : _) -> if nodeTag dep `S.member` set -- The dependency is already in our stack - cycle detected! then cycleError -- Continue with the dependency -- cgit v1.2.3