From 959114275554dee0141d397d572a823d5b1906e3 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sat, 27 Feb 2010 17:28:03 +0100 Subject: Cleanup with hlint. --- src/Text/Hakyll/File.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Text/Hakyll/File.hs b/src/Text/Hakyll/File.hs index 421a29c..438f9fe 100644 --- a/src/Text/Hakyll/File.hs +++ b/src/Text/Hakyll/File.hs @@ -20,6 +20,7 @@ import System.FilePath import System.Time (ClockTime) import Control.Monad import Data.List (isPrefixOf, sortBy) +import Data.Ord (comparing) import Control.Monad.Reader (liftIO) import Text.Hakyll.Hakyll @@ -83,9 +84,9 @@ toUrl path = do enableIndexUrl' <- askHakyll enableIndexUrl , ".htm" , ".html" ] - isIndex = (dropExtension $ takeFileName path) == "index" + isIndex = dropExtension (takeFileName path) == "index" withSimpleHtmlExtension = flip addExtension ".html" $ dropExtension path - indexUrl = (dropExtension path) ++ "/" + indexUrl = dropExtension path ++ "/" -- | Get the relative url to the site root, for a given (absolute) url @@ -131,7 +132,7 @@ getRecursiveContents topdir = do sortByBaseName :: [FilePath] -> [FilePath] sortByBaseName = sortBy compareBaseName where - compareBaseName f1 f2 = compare (takeFileName f1) (takeFileName f2) + compareBaseName = comparing takeFileName -- | A filter that takes all file names with a given extension. Prefix the -- extension with a dot: -- cgit v1.2.3