Bindist comparison tool: add --ignore-size-changes flag
[ghc-hetmet.git] / distrib / compare / Problem.hs
index f80c856..7854bc5 100644 (file)
@@ -7,9 +7,14 @@ data FileProblem = First  Problem
 
 data Problem = DuplicateFile FilePath
              | ExtraFile FilePath
+             | ExtraWay String
              | PermissionsChanged FilePath FilePath String String
              | FileSizeChanged FilePath FilePath Integer Integer
 
+isSizeChange :: FileProblem -> Bool
+isSizeChange (Change (FileSizeChanged {})) = True
+isSizeChange _ = False
+
 pprFileProblem :: FileProblem -> String
 pprFileProblem (First  p) = "First  " ++ pprProblem p
 pprFileProblem (Second p) = "Second " ++ pprProblem p
@@ -18,6 +23,7 @@ pprFileProblem (Change p) = "Change " ++ pprProblem p
 pprProblem :: Problem -> String
 pprProblem (DuplicateFile fp) = "Duplicate file: " ++ show fp
 pprProblem (ExtraFile fp) = "Extra file: " ++ show fp
+pprProblem (ExtraWay w) = "Extra way: " ++ show w
 pprProblem (PermissionsChanged fp1 fp2 p1 p2)
     = "Permissions changed:\n"
    ++ "    " ++ show fp1