aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Utils.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-05-13 20:05:50 +0000
committerDavid Waern <david.waern@gmail.com>2010-05-13 20:05:50 +0000
commit94335867d636db9ad6c111705283ec10c9ee1167 (patch)
tree37352d4abe829bb848cf5a8cf538c135024d587e /src/Haddock/Utils.hs
parent9dc3aeef7388cb962a2d021d9e119c586fc18068 (diff)
Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead
Diffstat (limited to 'src/Haddock/Utils.hs')
-rw-r--r--src/Haddock/Utils.hs14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/Haddock/Utils.hs b/src/Haddock/Utils.hs
index 9a712d70..a4883078 100644
--- a/src/Haddock/Utils.hs
+++ b/src/Haddock/Utils.hs
@@ -21,7 +21,7 @@ module Haddock.Utils (
contentsHtmlFile, indexHtmlFile,
frameIndexHtmlFile,
moduleIndexFrameName, mainFrameName, synopsisFrameName,
- subIndexHtmlFile, pathJoin,
+ subIndexHtmlFile,
anchorNameStr,
cssFile, iconFile, jsFile, plusFile, minusFile, framesFile,
@@ -165,7 +165,7 @@ moduleHtmlFile :: Module -> FilePath
moduleHtmlFile mdl =
case Map.lookup mdl html_xrefs of
Nothing -> mdl' ++ ".html"
- Just fp0 -> pathJoin [fp0, mdl' ++ ".html"]
+ Just fp0 -> joinPath [fp0, mdl' ++ ".html"]
where
mdl' = map (\c -> if c == '.' then '-' else c)
(moduleNameString (moduleName mdl))
@@ -204,16 +204,6 @@ anchorNameStr name | isValOcc name = "v:" ++ occNameString name
| otherwise = "t:" ++ occNameString name
-pathJoin :: [FilePath] -> FilePath
-pathJoin = foldr join []
- where join :: FilePath -> FilePath -> FilePath
- join path1 "" = path1
- join "" path2 = path2
- join path1 path2
- | isPathSeparator (last path1) = path1++path2
- | otherwise = path1++pathSeparator:path2
-
-
-- -----------------------------------------------------------------------------
-- Files we need to copy from our $libdir