diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-01-27 15:59:34 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-01-27 15:59:34 +0000 |
commit | a3a2348c6222ee0391cef6b7e62f372d5ed29e13 (patch) | |
tree | 6f040b14127cdd66ae1ab4fd775295ade473e926 /distrib/compare/FilenameDescr.hs | |
parent | 351a8c6bbd53ce07d687b5a96afff77c4c9910cc (diff) | |
download | haskell-a3a2348c6222ee0391cef6b7e62f372d5ed29e13.tar.gz |
Add support to compare for comparing whole directories
Diffstat (limited to 'distrib/compare/FilenameDescr.hs')
-rw-r--r-- | distrib/compare/FilenameDescr.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/distrib/compare/FilenameDescr.hs b/distrib/compare/FilenameDescr.hs index d21745cd26..37fd499d10 100644 --- a/distrib/compare/FilenameDescr.hs +++ b/distrib/compare/FilenameDescr.hs @@ -18,11 +18,11 @@ data FilenameDescrBit = VersionOf String | Ways deriving (Show, Eq, Ord) -normalise :: FilenameDescr -> FilenameDescr -normalise [] = [] -normalise [x] = [x] -normalise (FP x1 : FP x2 : xs) = normalise (FP (x1 ++ x2) : xs) -normalise (x : xs) = x : normalise xs +normaliseDescr :: FilenameDescr -> FilenameDescr +normaliseDescr [] = [] +normaliseDescr [x] = [x] +normaliseDescr (FP x1 : FP x2 : xs) = normaliseDescr (FP (x1 ++ x2) : xs) +normaliseDescr (x : xs) = x : normaliseDescr xs -- Sanity check that the FilenameDescr matches the filename in the tar line checkContent :: BuildInfo -> (FilenameDescr, TarLine) -> Errors |