diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-01-17 10:02:46 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-01-17 10:02:46 +0100 |
commit | b867e6f2042b64ba6ca2a3471bb12923f7d37456 (patch) | |
tree | 94c7d4188caf6ad1f336e5614c4fef25cae401e0 /src/Hakyll | |
parent | 6e7dc0e58fd2d7814934e0c041a4e18232102087 (diff) | |
download | hakyll-b867e6f2042b64ba6ca2a3471bb12923f7d37456.tar.gz |
Fix skipping certain compilers error
Diffstat (limited to 'src/Hakyll')
-rw-r--r-- | src/Hakyll/Core/DirectedGraph.hs | 9 | ||||
-rw-r--r-- | src/Hakyll/Core/Run.hs | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/Hakyll/Core/DirectedGraph.hs b/src/Hakyll/Core/DirectedGraph.hs index a81868e..76a030b 100644 --- a/src/Hakyll/Core/DirectedGraph.hs +++ b/src/Hakyll/Core/DirectedGraph.hs @@ -4,6 +4,7 @@ module Hakyll.Core.DirectedGraph ( DirectedGraph , fromList + , member , nodes , neighbours , reverse @@ -27,6 +28,14 @@ fromList :: Ord a -> DirectedGraph a -- ^ Resulting directed graph fromList = DirectedGraph . M.fromList . map (\(t, d) -> (t, Node t d)) +-- | Check if a node lies in the given graph +-- +member :: Ord a + => a -- ^ Node to check for + -> DirectedGraph a -- ^ Directed graph to check in + -> Bool -- ^ If the node lies in the graph +member n = M.member n . unDirectedGraph + -- | Get all nodes in the graph -- nodes :: Ord a diff --git a/src/Hakyll/Core/Run.hs b/src/Hakyll/Core/Run.hs index c81a5ff..7e428ae 100644 --- a/src/Hakyll/Core/Run.hs +++ b/src/Hakyll/Core/Run.hs @@ -95,10 +95,7 @@ addNewCompilers oldCompilers newCompilers = Hakyll $ do provider <- hakyllResourceProvider <$> ask store <- hakyllStore <$> ask - let -- Create a set of new compilers - newCompilerIdentifiers = S.fromList $ map fst newCompilers - - -- All compilers + let -- All compilers compilers = oldCompilers ++ newCompilers -- Get all dependencies for the compilers @@ -128,7 +125,7 @@ addNewCompilers oldCompilers newCompilers = Hakyll $ do -- Find obsolete items. Every item that is reachable from a modified -- item is considered obsolete. From these obsolete items, we are only -- interested in ones that are in the current subgraph. - obsolete = S.filter (`S.member` newCompilerIdentifiers) + obsolete = S.filter (`member` currentGraph) $ reachableNodes modified' $ reverse completeGraph -- Solve the graph and retain only the obsolete items |