summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hakyll.cabal89
-rw-r--r--src/Hakyll/Core/Identifier.hs6
2 files changed, 47 insertions, 48 deletions
diff --git a/hakyll.cabal b/hakyll.cabal
index d35aee9..97a9909 100644
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -1,5 +1,5 @@
Name: hakyll
-Version: 3.2.8.0
+Version: 3.2.8.1
Synopsis: A static website compiler library
Description:
@@ -63,28 +63,28 @@ Library
Hs-Source-Dirs: src
Build-Depends:
- base >= 4 && < 5,
- binary >= 0.5 && < 0.6,
- blaze-html >= 0.5 && < 0.6,
+ base >= 4 && < 5,
+ binary >= 0.5 && < 0.6,
+ blaze-html >= 0.5 && < 0.6,
blaze-markup >= 0.5.1 && < 0.6,
- bytestring >= 0.9 && < 0.10,
- citeproc-hs >= 0.3.2 && < 0.4,
- containers >= 0.3 && < 0.5,
- cryptohash >= 0.7 && < 0.8,
- directory >= 1.0 && < 1.2,
- filepath >= 1.0 && < 1.4,
- hamlet >= 1.0 && < 1.1,
- mtl >= 1 && < 2.2,
- old-locale >= 1.0 && < 1.1,
- old-time >= 1.0 && < 1.2,
- pandoc >= 1.9.3 && < 1.10,
- parsec >= 3.0 && < 3.2,
- process >= 1.0 && < 1.2,
- regex-base >= 0.93 && < 0.94,
- regex-tdfa >= 1.1 && < 1.2,
- tagsoup >= 0.12.6 && < 0.13,
- text >= 0.11 && < 1.12,
- time >= 1.1 && < 1.5
+ bytestring >= 0.9 && < 0.10,
+ citeproc-hs >= 0.3.2 && < 0.4,
+ containers >= 0.3 && < 0.5,
+ cryptohash >= 0.7 && < 0.8,
+ directory >= 1.0 && < 1.2,
+ filepath >= 1.0 && < 1.4,
+ hamlet >= 1.0 && < 1.1,
+ mtl >= 1 && < 2.2,
+ old-locale >= 1.0 && < 1.1,
+ old-time >= 1.0 && < 1.2,
+ pandoc >= 1.9.3 && < 1.10,
+ parsec >= 3.0 && < 3.2,
+ process >= 1.0 && < 1.2,
+ regex-base >= 0.93 && < 0.94,
+ regex-tdfa >= 1.1 && < 1.2,
+ tagsoup >= 0.12.6 && < 0.13,
+ text >= 0.11 && < 1.12,
+ time >= 1.1 && < 1.5
Exposed-Modules:
Hakyll
@@ -170,28 +170,29 @@ Test-suite hakyll-tests
test-framework-hunit >= 0.2 && < 0.3,
test-framework-quickcheck2 >= 0.2 && < 0.3,
-- Copy pasted from hakyll dependencies:
- base >= 4 && < 5,
- binary >= 0.5 && < 0.6,
- blaze-html >= 0.4 && < 0.6,
- bytestring >= 0.9 && < 0.10,
- citeproc-hs >= 0.3.2 && < 0.4,
- containers >= 0.3 && < 0.5,
- cryptohash >= 0.7 && < 0.8,
- directory >= 1.0 && < 1.2,
- filepath >= 1.0 && < 1.4,
- hamlet >= 0.10.3 && < 1.1,
- mtl >= 1 && < 2.2,
- old-locale >= 1.0 && < 1.1,
- old-time >= 1.0 && < 1.2,
- pandoc >= 1.9.3 && < 1.10,
- parsec >= 3.0 && < 3.2,
- process >= 1.0 && < 1.2,
- regex-base >= 0.93 && < 0.94,
- regex-tdfa >= 1.1 && < 1.2,
- tagsoup >= 0.12.6 && < 0.13,
- text >= 0.11 && < 0.12,
- time >= 1.1 && < 1.5,
- unix >= 2.4 && < 2.6
+ base >= 4 && < 5,
+ binary >= 0.5 && < 0.6,
+ blaze-html >= 0.5 && < 0.6,
+ blaze-markup >= 0.5.1 && < 0.6,
+ bytestring >= 0.9 && < 0.10,
+ citeproc-hs >= 0.3.2 && < 0.4,
+ containers >= 0.3 && < 0.5,
+ cryptohash >= 0.7 && < 0.8,
+ directory >= 1.0 && < 1.2,
+ filepath >= 1.0 && < 1.4,
+ hamlet >= 1.0 && < 1.1,
+ mtl >= 1 && < 2.2,
+ old-locale >= 1.0 && < 1.1,
+ old-time >= 1.0 && < 1.2,
+ pandoc >= 1.9.3 && < 1.10,
+ parsec >= 3.0 && < 3.2,
+ process >= 1.0 && < 1.2,
+ regex-base >= 0.93 && < 0.94,
+ regex-tdfa >= 1.1 && < 1.2,
+ tagsoup >= 0.12.6 && < 0.13,
+ text >= 0.11 && < 1.12,
+ time >= 1.1 && < 1.5,
+ unix >= 2.4 && < 2.6
Other-modules:
Hakyll.Web.Util.Html.Tests
diff --git a/src/Hakyll/Core/Identifier.hs b/src/Hakyll/Core/Identifier.hs
index 3b67381..90f0eea 100644
--- a/src/Hakyll/Core/Identifier.hs
+++ b/src/Hakyll/Core/Identifier.hs
@@ -38,11 +38,11 @@ module Hakyll.Core.Identifier
, setGroup
) where
-import Control.Arrow (second)
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mplus)
import Data.Monoid (Monoid, mempty, mappend)
import Data.List (intercalate)
+import System.FilePath (dropTrailingPathSeparator, splitPath)
import Data.Binary (Binary, get, put)
import GHC.Exts (IsString, fromString)
@@ -83,9 +83,7 @@ parseIdentifier :: String -> Identifier a
parseIdentifier = Identifier Nothing
. intercalate "/" . filter (not . null) . split'
where
- split' [] = [[]]
- split' str = let (pre, post) = second (drop 1) $ break (== '/') str
- in pre : split' post
+ split' = map dropTrailingPathSeparator . splitPath
-- | Convert an identifier to a relative 'FilePath'
--