From 6bf2d636864753eff8a5a31b6782f381f195806b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 17 Nov 2015 17:27:24 -0400 Subject: use intercalate instead of MissingH's join The two functions are identical. --- Utility/Path.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Utility/Path.hs') 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 -- cgit v1.2.3