@@ -62,15 +62,12 @@ compile (PCCOptions input _ outputDir opts usePrefix) = do
62 hPutStrLn stderr (P.prettyPrintMultipleWarnings (P.optionsVerboseErrors opts) warnings)
62 hPutStrLn stderr (P.prettyPrintMultipleWarnings (P.optionsVerboseErrors opts) warnings)
63 let filePathMap = M.fromList $ map (\(fp, P.Module _ _ mn _ _) -> (mn, fp)) ms
63 let filePathMap = M.fromList $ map (\(fp, P.Module _ _ mn _ _) -> (mn, fp)) ms
64 makeActions = buildMakeActions outputDir filePathMap usePrefix
64 makeActions = buildMakeActions outputDir filePathMap usePrefix
65− e <- runMake opts $ P.make makeActions (map snd ms)
65+ (e, warnings') <- runMake opts $ P.make makeActions (map snd ms)
67 Left errs -> do
67 Left errs -> do
68 putStrLn (P.prettyPrintMultipleErrors (P.optionsVerboseErrors opts) errs)
68 putStrLn (P.prettyPrintMultipleErrors (P.optionsVerboseErrors opts) errs)
69 exitFailure
69 exitFailure
70− Right (_, warnings') -> do
71− when (P.nonEmpty warnings') $
72− putStrLn (P.prettyPrintMultipleWarnings (P.optionsVerboseErrors opts) warnings')
73− exitSuccess
70+ Right _ -> exitSuccess
75readInput :: InputOptions -> IO [(Either P.RebuildPolicy FilePath, String)]
72readInput :: InputOptions -> IO [(Either P.RebuildPolicy FilePath, String)]
76readInput InputOptions{..} = forM ioInputFiles $ \inFile -> (Right inFile, ) <$> readUTF8File inFile
73readInput InputOptions{..} = forM ioInputFiles $ \inFile -> (Right inFile, ) <$> readUTF8File inFile