summaryrefslogtreecommitdiff
path: root/src/Hakyll
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-05-18 17:17:51 +0200
committerJasper Van der Jeugt <m@jaspervdj.be>2012-05-18 17:17:51 +0200
commit264aeed33d0bd8772a16fc5461d3bfabcf4eb16a (patch)
tree0a3568bdc1af3fca1b67f9b8a3d3ce82242abfc0 /src/Hakyll
parent5e5a188facdaf10ec0bf8ec85e1c2cacbbe9a671 (diff)
downloadhakyll-264aeed33d0bd8772a16fc5461d3bfabcf4eb16a.tar.gz
Use splitPath
Diffstat (limited to 'src/Hakyll')
-rw-r--r--src/Hakyll/Core/Identifier.hs6
1 files changed, 2 insertions, 4 deletions
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'
--