From 2fa48f4ea462a6e7f0bb22a8c292ee4efcec81e0 Mon Sep 17 00:00:00 2001 From: "andygill@ku.edu" Date: Mon, 15 Sep 2008 20:43:22 +0000 Subject: [PATCH] Fix Trac #2311: creates subdirs for package coverage information --- utils/hpc/HpcMarkup.hs | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/utils/hpc/HpcMarkup.hs b/utils/hpc/HpcMarkup.hs index f78a4af..e618b25 100644 --- a/utils/hpc/HpcMarkup.hs +++ b/utils/hpc/HpcMarkup.hs @@ -60,11 +60,6 @@ markup_main flags (prog:modNames) = do Nothing -> hpcError markup_plugin $ "unable to find tix file for: " ++ prog Just a -> return a -#if __GLASGOW_HASKELL__ >= 604 - -- create the dest_dir if needed - createDirectoryIfMissing True dest_dir -#endif - mods <- sequence [ genHtmlFromMod dest_dir hpcflags1 tix theFunTotals invertOutput | tix <- tixs @@ -79,11 +74,9 @@ markup_main flags (prog:modNames) = do let writeSummary filename cmp = do let mods' = sortBy cmp mods - - - putStrLn $ "Writing: " ++ (filename ++ ".html") - writeFile (dest_dir ++ "/" ++ filename ++ ".html") $ + + writeFileUsing (dest_dir ++ "/" ++ filename ++ ".html") $ "" ++ "