Skip to content

Commit 9d45eee

Browse files
ndmitchellaherrmann-da
authored andcommitted
#137, make the status message clearer about what worked and what didn't (#138)
1 parent 83978c3 commit 9d45eee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exe/Main.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -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

127127
expandFiles :: [FilePath] -> IO [FilePath]

0 commit comments

Comments
 (0)