diff options
Diffstat (limited to 'distrib/compare/Problem.hs')
-rw-r--r-- | distrib/compare/Problem.hs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/distrib/compare/Problem.hs b/distrib/compare/Problem.hs deleted file mode 100644 index 7854bc5f7d..0000000000 --- a/distrib/compare/Problem.hs +++ /dev/null @@ -1,37 +0,0 @@ - -module Problem where - -data FileProblem = First Problem - | Second Problem - | Change 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 -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 - ++ " " ++ show fp2 - ++ " " ++ p1 ++ " -> " ++ p2 -pprProblem (FileSizeChanged fp1 fp2 s1 s2) - = "Size changed:\n" - ++ " " ++ show fp1 ++ "\n" - ++ " " ++ show fp2 ++ "\n" - ++ " " ++ show s1 ++ " -> " ++ show s2 - |