on master help sign in
#137, make the status message clearer about what worked and what didn't (#138)
commit9d45eee21c8abd8db843a0762a287cb8fe1af3a5 authorNeil Mitchell <ndmitchell@gmail.com> dateFri 27 Sep 2019, 14:18 (7 years ago) parent83978c3
1 file changed+4−4
exe/Main.hs+4−4
exe/Main.hs+4−4
@@ -117,11 +117,11 @@ main = do
117117 setFilesOfInterest ide $ Set.fromList $ map toNormalizedFilePath files
118118 results <- runActionSync ide $ uses TypeCheck $ map toNormalizedFilePath files
119119 let (worked, failed) = partition fst $ zip (map isJust results) files
120− putStrLn $ "Files that worked: " ++ show (length worked)
121− putStrLn $ "Files that failed: " ++ show (length failed)
122− putStr $ unlines $ map ((++) " * " . snd) failed
120+ when (failed /= []) $
121+ putStr $ unlines $ "Files that failed:" : map ((++) " * " . snd) failed
123122
124− putStrLn "Done"
123+ let files xs = let n = length xs in if n == 1 then "1 file" else show n ++ " files"
124+ putStrLn $ "\nCompleted (" ++ files worked ++ " worked, " ++ files failed ++ " failed)"
125125
126126
127127expandFiles :: [FilePath] -> IO [FilePath]