From 78a1b71ccc5a99711f434dae99dd892c920324fe Mon Sep 17 00:00:00 2001 From: "andy@galois.com" Date: Wed, 27 Jun 2007 05:48:46 +0000 Subject: [PATCH] fixing creation of directory for html output; fixing html markup for 0% bars. --- utils/hpc/HpcMarkup.hs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/utils/hpc/HpcMarkup.hs b/utils/hpc/HpcMarkup.hs index 53eaf32..a46fd79 100644 --- a/utils/hpc/HpcMarkup.hs +++ b/utils/hpc/HpcMarkup.hs @@ -12,6 +12,7 @@ import Trace.Hpc.Util import HpcFlags import System.Environment +import System.Directory import Data.List import Data.Maybe(fromJust) import Data.Array @@ -55,6 +56,9 @@ markup_main flags (prog:modNames) = do Nothing -> error $ "unable to find tix file for: " ++ prog Just a -> return a + -- create the dest_dir if needed + createDirectoryIfMissing True dest_dir + mods <- sequence [ genHtmlFromMod dest_dir hpcDirs tix theFunTotals theHsPath invertOutput | tix <- tixs @@ -68,6 +72,9 @@ markup_main flags (prog:modNames) = do let writeSummary name cmp = do let mods' = sortBy cmp mods + + + putStrLn $ "Writing: " ++ (name ++ ".html") writeFile (dest_dir ++ "/" ++ name ++ ".html") $ @@ -75,6 +82,7 @@ markup_main flags (prog:modNames) = do "