From c630522ec0f17fafa9b54d1c2e654580098ae5ae Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 9 Dec 2009 18:56:48 +0100 Subject: Discovered the unless function. --- src/Text/Hakyll/Render.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Text/Hakyll/Render.hs b/src/Text/Hakyll/Render.hs index c611a88..7c52d9b 100644 --- a/src/Text/Hakyll/Render.hs +++ b/src/Text/Hakyll/Render.hs @@ -22,8 +22,7 @@ import Text.Hakyll.Util depends :: FilePath -> [FilePath] -> IO () -> IO () depends file dependencies action = do valid <- isCacheValid (toDestination file) dependencies - if valid then return () - else action + unless valid action createContext :: Page -> Context createContext = M.fromList . map packPair . M.toList -- cgit v1.2.3