[commit: packages/filepath] master: Reenable and fix QuickCheck property for makeRelative (#25) (1903af3)
git at git.haskell.org
git at git.haskell.org
Thu Mar 19 11:35:19 UTC 2015
Repository : ssh://git@git.haskell.org/filepath
On branch : master
Link : http://git.haskell.org/packages/filepath.git/commitdiff/1903af3aeb575234418f70b33c8dc749a6f5360f
>---------------------------------------------------------------
commit 1903af3aeb575234418f70b33c8dc749a6f5360f
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Sun Oct 26 22:13:08 2014 +0100
Reenable and fix QuickCheck property for makeRelative (#25)
Both x and y should be valid.
>---------------------------------------------------------------
1903af3aeb575234418f70b33c8dc749a6f5360f
System/FilePath/Internal.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/System/FilePath/Internal.hs b/System/FilePath/Internal.hs
index 7dec998..0a8726f 100644
--- a/System/FilePath/Internal.hs
+++ b/System/FilePath/Internal.hs
@@ -686,6 +686,7 @@ equalFilePath a b = f a == f b
-- There is no corresponding @makeAbsolute@ function, instead use
-- @System.Directory.canonicalizePath@ which has the same effect.
--
+-- > Valid y => Valid x => equalFilePath x y || (isRelative x && makeRelative y x == x) || equalFilePath (y </> makeRelative y x) x
-- > makeRelative x x == "."
-- > Windows: makeRelative "C:\\Home" "c:\\home\\bob" == "bob"
-- > Windows: makeRelative "C:\\Home" "c:/home/bob" == "bob"
More information about the ghc-commits
mailing list