on master help sign in
Cleanup with hlint.
commit959114275554dee0141d397d572a823d5b1906e3 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateSat 27 Feb 2010, 17:28 (17 years ago) parentd980dd4
1 file changed+4−3
src/Text/Hakyll/File.hs+4−3
src/Text/Hakyll/File.hs+4−3
@@ -20,6 +20,7 @@ import System.FilePath
2020import System.Time (ClockTime)
2121import Control.Monad
2222import Data.List (isPrefixOf, sortBy)
23+import Data.Ord (comparing)
2324import Control.Monad.Reader (liftIO)
2425
2526import Text.Hakyll.Hakyll
@@ -83,9 +84,9 @@ toUrl path = do enableIndexUrl' <- askHakyll enableIndexUrl
8384 , ".htm"
8485 , ".html"
8586 ]
86− isIndex = (dropExtension $ takeFileName path) == "index"
87+ isIndex = dropExtension (takeFileName path) == "index"
8788 withSimpleHtmlExtension = flip addExtension ".html" $ dropExtension path
88− indexUrl = (dropExtension path) ++ "/"
89+ indexUrl = dropExtension path ++ "/"
8990
9091
9192-- | Get the relative url to the site root, for a given (absolute) url
@@ -131,7 +132,7 @@ getRecursiveContents topdir = do
131132sortByBaseName :: [FilePath] -> [FilePath]
132133sortByBaseName = sortBy compareBaseName
133134 where
134− compareBaseName f1 f2 = compare (takeFileName f1) (takeFileName f2)
135+ compareBaseName = comparing takeFileName
135136
136137-- | A filter that takes all file names with a given extension. Prefix the
137138-- extension with a dot: