4 data FileProblem = First Problem
8 data Problem = DuplicateFile FilePath
10 | PermissionsChanged FilePath FilePath String String
11 | FileSizeChanged FilePath FilePath Integer Integer
13 pprFileProblem :: FileProblem -> String
14 pprFileProblem (First p) = "First " ++ pprProblem p
15 pprFileProblem (Second p) = "Second " ++ pprProblem p
16 pprFileProblem (Change p) = "Change " ++ pprProblem p
18 pprProblem :: Problem -> String
19 pprProblem (DuplicateFile fp) = "Duplicate file: " ++ show fp
20 pprProblem (ExtraFile fp) = "Extra file: " ++ show fp
21 pprProblem (PermissionsChanged fp1 fp2 p1 p2)
22 = "Permissions changed:\n"
25 ++ " " ++ p1 ++ " -> " ++ p2
26 pprProblem (FileSizeChanged fp1 fp2 s1 s2)
28 ++ " " ++ show fp1 ++ "\n"
29 ++ " " ++ show fp2 ++ "\n"
30 ++ " " ++ show s1 ++ " -> " ++ show s2