4 data FileProblem = First Problem
8 data Problem = DuplicateFile FilePath
11 | PermissionsChanged FilePath FilePath String String
12 | FileSizeChanged FilePath FilePath Integer Integer
14 pprFileProblem :: FileProblem -> String
15 pprFileProblem (First p) = "First " ++ pprProblem p
16 pprFileProblem (Second p) = "Second " ++ pprProblem p
17 pprFileProblem (Change p) = "Change " ++ pprProblem p
19 pprProblem :: Problem -> String
20 pprProblem (DuplicateFile fp) = "Duplicate file: " ++ show fp
21 pprProblem (ExtraFile fp) = "Extra file: " ++ show fp
22 pprProblem (ExtraWay w) = "Extra way: " ++ show w
23 pprProblem (PermissionsChanged fp1 fp2 p1 p2)
24 = "Permissions changed:\n"
27 ++ " " ++ p1 ++ " -> " ++ p2
28 pprProblem (FileSizeChanged fp1 fp2 s1 s2)
30 ++ " " ++ show fp1 ++ "\n"
31 ++ " " ++ show fp2 ++ "\n"
32 ++ " " ++ show s1 ++ " -> " ++ show s2