on master help sign in
Renaming for consistency
f1e726bJasper Van der Jeugt
src/Hakyll/Core/Compiler.hs+1−1
@@ -52,7 +52,7 @@ runCompiler compiler identifier provider route' store modified = do
52 -- In case we compiled an item, we will store a copy in the cache first,
52 -- In case we compiled an item, we will store a copy in the cache first,
53 -- before we return control. This makes sure the compiled item can later
53 -- before we return control. This makes sure the compiled item can later
54 -- be accessed by e.g. require.
54 -- be accessed by e.g. require.
55− ItemRule (CompiledItem x) ->
55+ CompileRule (CompiledItem x) ->
56 storeSet store "Hakyll.Core.Compiler.runCompiler" identifier x
56 storeSet store "Hakyll.Core.Compiler.runCompiler" identifier x
57
57
58 -- Otherwise, we do nothing here
58 -- Otherwise, we do nothing here
src/Hakyll/Core/Rules.hs+4−4
@@ -37,8 +37,8 @@ import Hakyll.Core.Writable
37-- * The compiler will produce more compilers. These new compilers need to be
37-- * The compiler will produce more compilers. These new compilers need to be
38-- added to the runtime if possible, since other items might depend upon them.
38-- added to the runtime if possible, since other items might depend upon them.
39--
39--
40−data CompileRule = ItemRule CompiledItem
40+data CompileRule = CompileRule CompiledItem
41− | AddCompilersRule [(Identifier, Compiler () CompiledItem)]
41+ | MetaCompileRule [(Identifier, Compiler () CompiledItem)]
42
42
43-- | A collection of rules for the compilation process
43-- | A collection of rules for the compilation process
44--
44--
@@ -81,7 +81,7 @@ tellCompilers :: (Binary a, Typeable a, Writable a)
81tellCompilers compilers = RulesM $ tell $ RuleSet mempty $
81tellCompilers compilers = RulesM $ tell $ RuleSet mempty $
82 map (second boxCompiler) compilers
82 map (second boxCompiler) compilers
83 where
83 where
84− boxCompiler = (>>> arr compiledItem >>> arr ItemRule)
84+ boxCompiler = (>>> arr compiledItem >>> arr CompileRule)
85
85
86-- | Add a compilation rule
86-- | Add a compilation rule
87--
87--
@@ -119,4 +119,4 @@ addCompilers :: (Binary a, Typeable a, Writable a)
119addCompilers identifier compiler = RulesM $ tell $ RuleSet mempty $
119addCompilers identifier compiler = RulesM $ tell $ RuleSet mempty $
120 [(identifier, compiler >>^ makeRule)]
120 [(identifier, compiler >>^ makeRule)]
121 where
121 where
122− makeRule = AddCompilersRule . map (second (>>^ compiledItem))
122+ makeRule = MetaCompileRule . map (second (>>^ compiledItem))
src/Hakyll/Core/Run.hs+1−1
@@ -141,7 +141,7 @@ runCompilers ((id', compiler) : compilers) = Hakyll $ do
141 result <- liftIO $ runCompiler compiler id' provider url store isModified
141 result <- liftIO $ runCompiler compiler id' provider url store isModified
142 liftIO $ putStrLn $ "Generated target: " ++ show id'
142 liftIO $ putStrLn $ "Generated target: " ++ show id'
143
143
144− let ItemRule compiled = result
144+ let CompileRule compiled = result
145
145
146 case url of
146 case url of
147 Nothing -> return ()
147 Nothing -> return ()