validity-path 0.3.0.2 → 0.4.0.0
raw patch · 2 files changed
+14/−6 lines, 2 filesdep ~validity
Dependency ranges changed: validity
Files
- src/Data/Validity/Path.hs +8/−0
- validity-path.cabal +6/−6
src/Data/Validity/Path.hs view
@@ -24,6 +24,7 @@ -- * Its path is not '.' #endif -- * Its path does not contain '..'.+-- * The path contains no UTF16 Surrogate codepoints -- * Parsing the path and rendering it again results in the same path. instance Validity (Path Abs File) where validate p@(Path fp) =@@ -38,6 +39,7 @@ , declare "The path does not equal \".\"" $ fp /= "." #endif , declare "The path does not contain '..'." $ not (".." `isInfixOf` fp)+ , decorate "The path contains no UTF16 Surrogate codepoints" $ decorateList fp validateCharNotUtf16SurrogateCodePoint , declare "The path can be identically parsed as an absolute file path." $ parseAbsFile fp == Just p ]@@ -54,6 +56,7 @@ #endif -- * Its path is not '.' -- * Its path does not contain '..'.+-- * The path contains no UTF16 Surrogate codepoints -- * Parsing the path and rendering it again results in the same path. instance Validity (Path Rel File) where validate p@(Path fp) =@@ -69,6 +72,7 @@ , declare "The path does not end in /." $ not ("/." `isSuffixOf` fp) #endif , declare "The path does not contain '..'." $ not (".." `isInfixOf` fp)+ , decorate "The path contains no UTF16 Surrogate codepoints" $ decorateList fp validateCharNotUtf16SurrogateCodePoint , declare "The path can be identically parsed as a relative file path." $ parseRelFile fp == Just p ]@@ -79,6 +83,7 @@ -- * Its path has a trailing path separator -- * Its path is valid according to 'System.FilePath's definition. -- * Its path does not contain '..'.+-- * The path contains no UTF16 Surrogate codepoints -- * Parsing the path and rendering it again results in the same path. instance Validity (Path Abs Dir) where validate p@(Path fp) =@@ -89,6 +94,7 @@ , declare "System.FilePath considers the path valid." $ FilePath.isValid fp , declare "The path does not contain '..'." $ not (".." `isInfixOf` fp)+ , decorate "The path contains no UTF16 Surrogate codepoints" $ decorateList fp validateCharNotUtf16SurrogateCodePoint , declare "The path can be identically parsed as an absolute directory path." $ parseAbsDir fp == Just p ]@@ -103,6 +109,7 @@ -- * Its path is not '.' #endif -- * Its path does not contain '..'.+-- * The path contains no UTF16 Surrogate codepoints -- * Parsing the path and rendering it again results in the same path. instance Validity (Path Rel Dir) where validate p@(Path fp) =@@ -118,6 +125,7 @@ , declare "The path does not equal \".\"" $ fp /= "." #endif , declare "The path does not contain '..'." $ not (".." `isInfixOf` fp)+ , decorate "The path contains no UTF16 Surrogate codepoints" $ decorateList fp validateCharNotUtf16SurrogateCodePoint , declare "The path can be identically parsed as a relative directory path." $ parseRelDir fp == Just p ]
validity-path.cabal view
@@ -1,13 +1,13 @@-cabal-version: >= 1.10+cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.29.6.+-- This file has been generated from package.yaml by hpack version 0.31.2. -- -- see: https://github.com/sol/hpack ----- hash: 0cb2a6f2f1ee036dcdd254552f33541caa2df7ac6d0388c80a9fe8f3ae3ae387+-- hash: 95594605f35327f048b5baa0aa6c9b48d481e101c5df9ab5ba0390dc02bfb493 name: validity-path-version: 0.3.0.2+version: 0.4.0.0 synopsis: Validity instances for Path description: Please see README.md category: Validity@@ -36,7 +36,7 @@ base >=4.7 && <5 , filepath >=1.3 , path >=0.5- , validity >=0.5+ , validity >=0.9.0.2 default-language: Haskell2010 test-suite validity-path-test@@ -54,6 +54,6 @@ , genvalidity-hspec , hspec , path >=0.5- , validity >=0.5+ , validity >=0.9.0.2 , validity-path default-language: Haskell2010