LIB: style formatting
This commit is contained in:
parent
9efe2e5f60
commit
2ca7df5696
@ -242,7 +242,8 @@ sadir f@(bp :/ constr) =
|
|||||||
|
|
||||||
sdir :: File FileInfo -> (Bool, File FileInfo)
|
sdir :: File FileInfo -> (Bool, File FileInfo)
|
||||||
sdir f@(SymLink { sdest = (_ :/ s@(SymLink {}) )})
|
sdir f@(SymLink { sdest = (_ :/ s@(SymLink {}) )})
|
||||||
-- we have to follow a chain of symlinks here
|
-- we have to follow a chain of symlinks here, but
|
||||||
|
-- return only the very first level
|
||||||
= case (sdir s) of
|
= case (sdir s) of
|
||||||
(True, _) -> (True, f)
|
(True, _) -> (True, f)
|
||||||
_ -> (False, f)
|
_ -> (False, f)
|
||||||
@ -260,7 +261,8 @@ safile f@(bp :/ constr) =
|
|||||||
|
|
||||||
sfile :: File FileInfo -> (Bool, File FileInfo)
|
sfile :: File FileInfo -> (Bool, File FileInfo)
|
||||||
sfile f@(SymLink { sdest = (_ :/ s@(SymLink {}) )})
|
sfile f@(SymLink { sdest = (_ :/ s@(SymLink {}) )})
|
||||||
-- we have to follow a chain of symlinks here
|
-- we have to follow a chain of symlinks here, but
|
||||||
|
-- return only the very first level
|
||||||
= case (sfile s) of
|
= case (sfile s) of
|
||||||
(True, _) -> (True, f)
|
(True, _) -> (True, f)
|
||||||
_ -> (False, f)
|
_ -> (False, f)
|
||||||
@ -279,11 +281,17 @@ pattern SARegFile <- (saregfile -> (True, _))
|
|||||||
pattern SRegFile <- (sregfile -> (True, _))
|
pattern SRegFile <- (sregfile -> (True, _))
|
||||||
|
|
||||||
-- |Matches on directories or symlinks pointing to directories.
|
-- |Matches on directories or symlinks pointing to directories.
|
||||||
|
-- If the symlink is pointing to a symlink pointing to a directory, then
|
||||||
|
-- it will return True, but also return the first element in the symlink-
|
||||||
|
-- chain, not the last.
|
||||||
pattern SADir f <- (sadir -> (True, f))
|
pattern SADir f <- (sadir -> (True, f))
|
||||||
pattern SDir f <- (sdir -> (True, f))
|
pattern SDir f <- (sdir -> (True, f))
|
||||||
|
|
||||||
-- |Matches on any non-directory kind of files or symlinks pointing to
|
-- |Matches on any non-directory kind of files or symlinks pointing to
|
||||||
-- such.
|
-- such.
|
||||||
|
-- If the symlink is pointing to a symlink pointing to such a file, then
|
||||||
|
-- it will return True, but also return the first element in the symlink-
|
||||||
|
-- chain, not the last.
|
||||||
pattern SAFile f <- (safile -> (True, f))
|
pattern SAFile f <- (safile -> (True, f))
|
||||||
pattern SFile f <- (sfile -> (True, f))
|
pattern SFile f <- (sfile -> (True, f))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user