on master help sign in
fixing the coding style
7fc2f67Piyush P Kurur
src/Hakyll/Core/Configuration.hs+12−12
@@ -8,7 +8,7 @@ module Hakyll.Core.Configuration
8
8
9
9
10--------------------------------------------------------------------------------
10--------------------------------------------------------------------------------
11−import Data.Default
11+import Data.Default (Default(..))
12import Data.List (isPrefixOf, isSuffixOf)
12import Data.List (isPrefixOf, isSuffixOf)
13import System.FilePath (normalise, takeFileName)
13import System.FilePath (normalise, takeFileName)
14
14
@@ -57,8 +57,9 @@ data Configuration = Configuration
57 inMemoryCache :: Bool
57 inMemoryCache :: Bool
58 }
58 }
59
59
60+--------------------------------------------------------------------------------
60instance Default Configuration where
61instance Default Configuration where
61− def = Configuration
62+ def = Configuration
62 { destinationDirectory = "_site"
63 { destinationDirectory = "_site"
63 , storeDirectory = "_cache"
64 , storeDirectory = "_cache"
64 , tmpDirectory = "_cache/tmp"
65 , tmpDirectory = "_cache/tmp"
@@ -67,18 +68,17 @@ instance Default Configuration where
67 , deployCommand = "echo 'No deploy command specified'"
68 , deployCommand = "echo 'No deploy command specified'"
68 , inMemoryCache = True
69 , inMemoryCache = True
69 }
70 }
70− where
71+ where
71− ignoreFile' path
72+ ignoreFile' path
72− | "." `isPrefixOf` fileName = True
73+ | "." `isPrefixOf` fileName = True
73− | "#" `isPrefixOf` fileName = True
74+ | "#" `isPrefixOf` fileName = True
74− | "~" `isSuffixOf` fileName = True
75+ | "~" `isSuffixOf` fileName = True
75− | ".swp" `isSuffixOf` fileName = True
76+ | ".swp" `isSuffixOf` fileName = True
76− | otherwise = False
77+ | otherwise = False
77− where
78+ where
78− fileName = takeFileName path
79+ fileName = takeFileName path
79
80
80--------------------------------------------------------------------------------
81--------------------------------------------------------------------------------
81−
82-- | Default configuration for a hakyll application
82-- | Default configuration for a hakyll application
83defaultConfiguration :: Configuration
83defaultConfiguration :: Configuration
84defaultConfiguration = Configuration
84defaultConfiguration = Configuration