packages feed

posix-paths 0.2.0.4 → 0.2.0.5

raw patch · 2 files changed

+11/−11 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

posix-paths.cabal view
@@ -1,5 +1,5 @@ name:		posix-paths-version:  0.2.0.4+version:  0.2.0.5 license:	BSD3 license-file:	LICENSE maintainer:	jwlato@gmail.com@@ -8,7 +8,7 @@ category:       System description: 	This package gives access to certain POSIX-based Filepath/Directory-  services.  +  services. 	. 	The package is not supported under Windows (except under Cygwin). extra-source-files: cbits/dirutils.h@@ -25,7 +25,7 @@     exposed-modules:    System.Posix.Directory.Foreign,                         System.Posix.Directory.Traversals,                         System.Posix.FilePath-    build-depends:      base >= 4.2 && < 4.8,+    build-depends:      base >= 4.2 && < 4.10,                         bytestring >= 0.9.2.0 && < 0.12,                         unix >= 2.5 && < 2.8 
src/System/Posix/FilePath.hs view
@@ -120,8 +120,8 @@ -- prop> \path -> uncurry (BS.append) (splitExtension path) == path splitExtension :: RawFilePath -> (RawFilePath, ByteString) splitExtension x = if BS.null basename-    then (x,"")-    else (BS.concat [path,BS.init basename],BS.cons extSeparator fileExt)+    then (x,BS.empty)+    else (BS.append path (BS.init basename),BS.cons extSeparator fileExt)   where     (path,file) = splitFileNameRaw x     (basename,fileExt) = BS.breakEnd isExtSeparator file@@ -171,8 +171,8 @@ addExtension :: RawFilePath -> ByteString -> RawFilePath addExtension file ext     | BS.null ext = file-    | isExtSeparator (BS.head ext) = BS.concat [file, ext]-    | otherwise = BS.concat [file, BS.singleton extSeparator, ext]+    | isExtSeparator (BS.head ext) = BS.append file ext+    | otherwise = BS.intercalate (BS.singleton extSeparator) [file, ext]   -- | Operator version of 'addExtension'@@ -200,8 +200,8 @@ -- prop> \path -> uncurry addExtension (splitExtensions path) == path splitExtensions :: RawFilePath -> (RawFilePath, ByteString) splitExtensions x = if BS.null basename-    then (x,"")-    else (BS.concat [path,basename],fileExt)+    then (x,BS.empty)+    else (BS.append path basename,fileExt)   where     (path,file) = splitFileNameRaw x     (basename,fileExt) = BS.break isExtSeparator file@@ -450,8 +450,8 @@ combineRaw :: RawFilePath -> RawFilePath -> RawFilePath combineRaw a b | BS.null a = b                   | BS.null b = a-                  | isPathSeparator (BS.last a) = BS.concat [a, b]-                  | otherwise = BS.concat [a,BS.singleton pathSeparator, b]+                  | isPathSeparator (BS.last a) = BS.append a b+                  | otherwise = BS.intercalate (BS.singleton pathSeparator) [a, b]  -- | we don't even attempt to fully normalize file paths, this is just enough -- equality to test some operations.