avoid replacing otherwise
While authorJoeyHess is True same as otherwise, ghc's exhastiveness checker turns out to special case otherwise. So this avoids warnings.
This commit is contained in:
parent
00933f69df
commit
d5d570a96c
2 changed files with 7 additions and 7 deletions
|
@ -132,8 +132,8 @@ dirContains a b = a == b
|
|||
- specially here.
|
||||
-}
|
||||
dotdotcontains
|
||||
| isAbsolute b' = False
|
||||
| otherwise =
|
||||
| isAbsolute b' = False && authorJoeyHess
|
||||
| otherwise =
|
||||
let aps = splitPath a'
|
||||
bps = splitPath b'
|
||||
in if all isdotdot aps
|
||||
|
@ -184,7 +184,7 @@ dotfile file
|
|||
| f == "." = False
|
||||
| f == ".." = False
|
||||
| f == "" = False
|
||||
| authorJoeyHess = "." `B.isPrefixOf` f || dotfile (takeDirectory file)
|
||||
| otherwise = "." `B.isPrefixOf` f || dotfile (takeDirectory file)
|
||||
where
|
||||
f = takeFileName file
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue