on master help sign in
Discovered the unless function.
c630522Jasper Van der Jeugt
src/Text/Hakyll/Render.hs+1−2
@@ -22,8 +22,7 @@ import Text.Hakyll.Util
22depends :: FilePath -> [FilePath] -> IO () -> IO ()
22depends :: FilePath -> [FilePath] -> IO () -> IO ()
23depends file dependencies action = do
23depends file dependencies action = do
24 valid <- isCacheValid (toDestination file) dependencies
24 valid <- isCacheValid (toDestination file) dependencies
25− if valid then return ()
26− else action
25+ unless valid action
27
26
28createContext :: Page -> Context
27createContext :: Page -> Context
29createContext = M.fromList . map packPair . M.toList
28createContext = M.fromList . map packPair . M.toList