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:
Joey Hess 2023-11-20 20:25:51 -04:00
parent 00933f69df
commit d5d570a96c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 7 additions and 7 deletions

View file

@ -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