summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-02-27 17:28:03 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-02-27 17:28:03 +0100
commit959114275554dee0141d397d572a823d5b1906e3 (patch)
treef4d3c83d220298e5bd16c04536911fad2980f421
parentd980dd48ba958caf74c351c8e4797276efc724e1 (diff)
downloadhakyll-959114275554dee0141d397d572a823d5b1906e3.tar.gz
Cleanup with hlint.
-rw-r--r--src/Text/Hakyll/File.hs7
1 files 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: