From cf9838150801dc71d68cd3a4ca0631946d749256 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Thu, 4 Apr 2013 11:47:50 +0200 Subject: Add event filtering based on pattern --- src/Hakyll/Core/Rules/Internal.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/Hakyll/Core/Rules') diff --git a/src/Hakyll/Core/Rules/Internal.hs b/src/Hakyll/Core/Rules/Internal.hs index 6bb82df..a7c2059 100644 --- a/src/Hakyll/Core/Rules/Internal.hs +++ b/src/Hakyll/Core/Rules/Internal.hs @@ -47,14 +47,17 @@ data RuleSet = RuleSet rulesCompilers :: [(Identifier, Compiler SomeItem)] , -- | A set of the actually used files rulesResources :: Set Identifier + , -- | A pattern we can use to check if a file *would* be used. This is + -- needed for the preview server. + rulesPattern :: Pattern } -------------------------------------------------------------------------------- instance Monoid RuleSet where - mempty = RuleSet mempty mempty mempty - mappend (RuleSet r1 c1 s1) (RuleSet r2 c2 s2) = - RuleSet (mappend r1 r2) (mappend c1 c2) (mappend s1 s2) + mempty = RuleSet mempty mempty mempty mempty + mappend (RuleSet r1 c1 s1 p1) (RuleSet r2 c2 s2 p2) = + RuleSet (mappend r1 r2) (mappend c1 c2) (mappend s1 s2) (p1 .||. p2) -------------------------------------------------------------------------------- -- cgit v1.2.3