diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-11-17 17:27:24 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-11-17 17:27:24 -0400 |
commit | 6bf2d636864753eff8a5a31b6782f381f195806b (patch) | |
tree | dd1efa7378366962b6ee3dc214fa34aac4c0a8e3 /Utility/Path.hs | |
parent | 9ed65a1226cc67000b12d768d6f5e8acaada1c65 (diff) |
use intercalate instead of MissingH's join
The two functions are identical.
Diffstat (limited to 'Utility/Path.hs')
-rw-r--r-- | Utility/Path.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs index 4c2dd5c8b..1771d1e6d 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -89,7 +89,7 @@ parentDir = takeDirectory . dropTrailingPathSeparator upFrom :: FilePath -> Maybe FilePath upFrom dir | length dirs < 2 = Nothing - | otherwise = Just $ joinDrive drive (join s $ init dirs) + | otherwise = Just $ joinDrive drive (intercalate s $ init dirs) where -- on Unix, the drive will be "/" when the dir is absolute, otherwise "" (drive, path) = splitDrive dir @@ -149,7 +149,7 @@ relPathDirToFile from to = relPathDirToFileAbs <$> absPath from <*> absPath to relPathDirToFileAbs :: FilePath -> FilePath -> FilePath relPathDirToFileAbs from to | takeDrive from /= takeDrive to = to - | otherwise = join s $ dotdots ++ uncommon + | otherwise = intercalate s $ dotdots ++ uncommon where s = [pathSeparator] pfrom = split s from |