summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Rules/Internal.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-15 18:32:55 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-15 18:32:55 +0100
commit5a591ee24c50ed25702c06f8f811189984e443ea (patch)
tree3f112517c7042e11e3bd475fb4849c515d789835 /src/Hakyll/Core/Rules/Internal.hs
parentabfb4c19195cf305637f1a9acd7f6dd70d59b831 (diff)
downloadhakyll-5a591ee24c50ed25702c06f8f811189984e443ea.tar.gz
Rules DSL tracks resources used
Diffstat (limited to 'src/Hakyll/Core/Rules/Internal.hs')
-rw-r--r--src/Hakyll/Core/Rules/Internal.hs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Hakyll/Core/Rules/Internal.hs b/src/Hakyll/Core/Rules/Internal.hs
index bedc67a..2895257 100644
--- a/src/Hakyll/Core/Rules/Internal.hs
+++ b/src/Hakyll/Core/Rules/Internal.hs
@@ -15,6 +15,7 @@ import Control.Monad.Writer (WriterT, execWriterT)
import Control.Monad.Reader (ReaderT, runReaderT)
import Control.Monad.State (State, evalState)
import Data.Monoid (Monoid, mempty, mappend)
+import Data.Set (Set)
import Hakyll.Core.ResourceProvider
import Hakyll.Core.Identifier
@@ -35,14 +36,18 @@ data CompileRule = CompileRule CompiledItem
-- | A collection of rules for the compilation process
--
data RuleSet = RuleSet
- { rulesRoutes :: Routes
- , rulesCompilers :: [(Identifier, Compiler () CompileRule)]
+ { -- | Routes used in the compilation structure
+ rulesRoutes :: Routes
+ , -- | Compilation rules
+ rulesCompilers :: [(Identifier, Compiler () CompileRule)]
+ , -- | A list of the used resources
+ rulesResources :: Set Resource
}
instance Monoid RuleSet where
- mempty = RuleSet mempty mempty
- mappend (RuleSet r1 c1) (RuleSet r2 c2) =
- RuleSet (mappend r1 r2) (mappend c1 c2)
+ mempty = RuleSet mempty mempty mempty
+ mappend (RuleSet r1 c1 s1) (RuleSet r2 c2 s2) =
+ RuleSet (mappend r1 r2) (mappend c1 c2) (mappend s1 s2)
-- | Rule state
--