summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/File.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-17 12:37:55 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-17 12:37:55 +0100
commitaa44d6c0da442887155a47c77f03209224517af0 (patch)
treeb9c1d8fe6bed4eb1922d737f8817d851d8a34f5d /src/Text/Hakyll/File.hs
parent003734442486876153911d339f07d4379e8dca20 (diff)
downloadhakyll-aa44d6c0da442887155a47c77f03209224517af0.tar.gz
Documentation++.
Diffstat (limited to 'src/Text/Hakyll/File.hs')
-rw-r--r--src/Text/Hakyll/File.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Hakyll/File.hs b/src/Text/Hakyll/File.hs
index ed2bbea..0a21638 100644
--- a/src/Text/Hakyll/File.hs
+++ b/src/Text/Hakyll/File.hs
@@ -31,11 +31,11 @@ removeLeadingSeparator path
path' = if "$root" `isPrefixOf` path then drop 5 path
else path
--- | Convert a relative filepath to a filepath in the destination (_site).
+-- | Convert a relative filepath to a filepath in the destination (@_site@).
toDestination :: FilePath -> FilePath
toDestination path = "_site" </> (removeLeadingSeparator path)
--- | Convert a relative filepath to a filepath in the cache (_cache).
+-- | Convert a relative filepath to a filepath in the cache (@_cache@).
toCache :: FilePath -> FilePath
toCache path = "_cache" </> (removeLeadingSeparator path)
@@ -100,7 +100,9 @@ directory action dir = do
mapM_ action contents
-- | Check if a cache file is still valid.
-isCacheValid :: FilePath -> [FilePath] -> Hakyll Bool
+isCacheValid :: FilePath -- ^ The cached file.
+ -> [FilePath] -- ^ Dependencies of the cached file.
+ -> Hakyll Bool
isCacheValid cache depends = do
exists <- liftIO $ doesFileExist cache
if not exists