packages feed

filepath 1.2.0.0 → 1.2.0.1

raw patch · 2 files changed

+17/−8 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

System/FilePath/Internal.hs view
@@ -696,14 +696,20 @@ -- > Windows: normalise "c:/file" == "C:\\file" -- >          normalise "." == "." -- > Posix:   normalise "./" == "./"+-- > Posix:   normalise "./." == "./"+-- > Posix:   normalise "bob/fred/." == "bob/fred/" normalise :: FilePath -> FilePath normalise path = joinDrive (normaliseDrive drv) (f pth)-              ++ [pathSeparator | not (null pth) && isPathSeparator (last pth)]+              ++ [pathSeparator | isDirPath pth]     where         (drv,pth) = splitDrive path -        f = joinPath . dropDots [] . splitDirectories . propSep+        isDirPath xs = lastSep xs+            || not (null xs) && last xs == '.' && lastSep (init xs)+        lastSep xs = not (null xs) && isPathSeparator (last xs) +        f = joinPath . dropDots . splitDirectories . propSep+         propSep (a:b:xs)          | isPathSeparator a && isPathSeparator b = propSep (a:xs)         propSep (a:xs)@@ -711,9 +717,12 @@         propSep (x:xs) = x : propSep xs         propSep [] = [] -        dropDots acc (".":xs) | not $ null xs = dropDots acc xs-        dropDots acc (x:xs) = dropDots (x:acc) xs-        dropDots acc [] = reverse acc+        dropDots xs | all (== ".") xs = ["."]+        dropDots xs = dropDots' [] xs++        dropDots' acc (".":xs) = dropDots' acc xs+        dropDots' acc (x:xs) = dropDots' (x:acc) xs+        dropDots' acc [] = reverse acc  normaliseDrive :: FilePath -> FilePath normaliseDrive drive | isPosix = drive
filepath.cabal view
@@ -1,5 +1,5 @@ Name:           filepath-Version:        1.2.0.0+Version:        1.2.0.1 License:        BSD3 license-file:   LICENSE Author:         Neil Mitchell@@ -20,6 +20,6 @@     Build-Depends:  base >= 2 && < 5  source-repository head-    type:     darcs-    location: http://darcs.haskell.org/packages/filepath/+    type:     git+    location: http://darcs.haskell.org/packages/filepath.git/