From 8726886298e6b233d66c9ae1a211c13decf6a405 Mon Sep 17 00:00:00 2001 From: bjorn Date: Thu, 16 Oct 2008 10:12:57 +0000 Subject: A bit more verbosity when combining PGF files. Use putPointE when writing output files. --- src/GFC.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/GFC.hs') diff --git a/src/GFC.hs b/src/GFC.hs index 62a57ba0c..ef6968da3 100644 --- a/src/GFC.hs +++ b/src/GFC.hs @@ -51,9 +51,10 @@ compileCFFiles opts fs = unionPGFFiles :: Options -> [FilePath] -> IOE () unionPGFFiles opts fs = - do pgfs <- ioeIO $ mapM readPGF fs + do pgfs <- mapM readPGFVerbose fs let pgf = foldl1 unionPGF pgfs writeOutputs opts pgf + where readPGFVerbose f = putPointE Normal opts ("Reading " ++ f ++ "...") $ ioeIO $ readPGF f writeOutputs :: Options -> PGF -> IOE () writeOutputs opts pgf = @@ -66,9 +67,8 @@ writeOutput opts file str = do let path = case flag optOutputDir opts of Nothing -> file Just dir -> dir file - writeOutputFile path str + writeOutputFile opts path str -writeOutputFile :: FilePath -> String -> IOE () -writeOutputFile outfile output = ioeIO $ - do writeFile outfile output - putStrLn $ "wrote file " ++ outfile +writeOutputFile :: Options -> FilePath -> String -> IOE () +writeOutputFile opts outfile output = + do putPointE Normal opts ("Writing " ++ outfile ++ "...") $ ioeIO $ writeFile outfile output -- cgit v1.2.3