5 Commits
0.5.6 ... 0.5.7

Author SHA1 Message Date
Chris Done
e2974d3152 Bump to 0.5.7 2016-03-06 17:43:49 +01:00
Chris Done
dbee82c69b Merge pull request #14 from felixonmars/patch-1
Fix a haddock parse error
2016-03-06 17:43:02 +01:00
Felix Yan
05271c94af Fix a haddock parse error
The line was triggering parse error when running haddock:

```
src/Path.hs:16:1:
    parse error on input ‘-- | A normalizing well-typed path type.’
```

Removing it works for me.
2016-03-05 13:44:08 +08:00
Chris Done
9d357b24c8 Remove redundant check for /= . or .. 2016-03-04 15:11:06 +01:00
Chris Done
62c681819c Update test suite 2016-03-04 15:09:21 +01:00
4 changed files with 5 additions and 6 deletions

View File

@@ -1,3 +1,5 @@
0.5.7:
* Fix haddock problem.
0.5.6: 0.5.6:
* Reject only .. and . * Reject only .. and .
0.5.5: 0.5.5:

View File

@@ -1,5 +1,5 @@
name: path name: path
version: 0.5.6 version: 0.5.7
synopsis: Support for well-typed paths synopsis: Support for well-typed paths
description: Support for will-typed paths. description: Support for will-typed paths.
license: BSD3 license: BSD3

View File

@@ -13,8 +13,6 @@
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE EmptyDataDecls #-}
-- | A normalizing well-typed path type.
module Path module Path
(-- * Types (-- * Types
Path Path
@@ -134,7 +132,6 @@ parseAbsFile filepath =
not ("~/" `isPrefixOf` filepath) && not ("~/" `isPrefixOf` filepath) &&
not (hasParentDir filepath) && not (hasParentDir filepath) &&
not (null (normalizeFile filepath)) && not (null (normalizeFile filepath)) &&
filepath /= "." && filepath /= ".." &&
FilePath.isValid filepath FilePath.isValid filepath
then return (Path (normalizeFile filepath)) then return (Path (normalizeFile filepath))
else throwM (InvalidAbsFile filepath) else throwM (InvalidAbsFile filepath)

View File

@@ -156,7 +156,7 @@ parseRelDirSpec =
failing "///foo//bar//mu/" failing "///foo//bar//mu/"
failing "///foo//bar////mu" failing "///foo//bar////mu"
failing "///foo//bar/.//mu" failing "///foo//bar/.//mu"
succeeding "..." (Path "...") succeeding "..." (Path ".../")
succeeding "foo.bak" (Path "foo.bak/") succeeding "foo.bak" (Path "foo.bak/")
succeeding "./foo" (Path "foo/") succeeding "./foo" (Path "foo/")
succeeding "././foo" (Path "foo/") succeeding "././foo" (Path "foo/")
@@ -177,7 +177,7 @@ parseAbsFileSpec =
failing "/" failing "/"
failing "//" failing "//"
failing "///foo//bar//mu/" failing "///foo//bar//mu/"
succeeding "..." (Path "...") succeeding "/..." (Path "/...")
succeeding "/foo.txt" (Path "/foo.txt") succeeding "/foo.txt" (Path "/foo.txt")
succeeding "///foo//bar////mu.txt" (Path "/foo/bar/mu.txt") succeeding "///foo//bar////mu.txt" (Path "/foo/bar/mu.txt")
succeeding "///foo//bar/.//mu.txt" (Path "/foo/bar/mu.txt") succeeding "///foo//bar/.//mu.txt" (Path "/foo/bar/mu.txt")