projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve runghc's argument handling
[ghc-hetmet.git]
/
utils
/
hpc
/
HpcReport.hs
diff --git
a/utils/hpc/HpcReport.hs
b/utils/hpc/HpcReport.hs
index
2c502f4
..
2950cbf
100644
(file)
--- a/
utils/hpc/HpcReport.hs
+++ b/
utils/hpc/HpcReport.hs
@@
-13,7
+13,7
@@
import HpcFlags
import Trace.Hpc.Mix
import Trace.Hpc.Tix
import Control.Monad hiding (guard)
import Trace.Hpc.Mix
import Trace.Hpc.Tix
import Control.Monad hiding (guard)
-import qualified Data.Set as Set
+import qualified HpcSet as Set
notExpecting :: String -> a
notExpecting s = error ("not expecting "++s)
notExpecting :: String -> a
notExpecting s = error ("not expecting "++s)
@@
-152,7
+152,7
@@
single (BinBox {}) = False
modInfo :: Flags -> Bool -> (String,[Integer]) -> IO ModInfo
modInfo hpcflags qualDecList (moduleName,tickCounts) = do
modInfo :: Flags -> Bool -> (String,[Integer]) -> IO ModInfo
modInfo hpcflags qualDecList (moduleName,tickCounts) = do
- Mix _ _ _ _ mes <- readMix (hpcDirs hpcflags) moduleName
+ Mix _ _ _ _ mes <- readMixWithFlags hpcflags moduleName
return (q (accumCounts (zip (map snd mes) tickCounts) miZero))
where
q mi = if qualDecList then mi{decPaths = map (moduleName:) (decPaths mi)}
return (q (accumCounts (zip (map snd mes) tickCounts) miZero))
where
q mi = if qualDecList then mi{decPaths = map (moduleName:) (decPaths mi)}
@@
-225,9
+225,9
@@
report_main hpcflags (progName:mods) = do
| TixModule m _h _ tcs <- tickCounts
, allowModule hpcflags1 m
]
| TixModule m _h _ tcs <- tickCounts
, allowModule hpcflags1 m
]
- Nothing -> error $ "unable to find tix file for:" ++ progName
-
-
+ Nothing -> hpcError report_plugin $ "unable to find tix file for:" ++ progName
+report_main hpcflags [] =
+ hpcError report_plugin $ "no .tix file or executable name specified"
makeReport :: Flags -> String -> [(String,[Integer])] -> IO ()
makeReport hpcflags progName modTcs | xmlOutput hpcflags = do
makeReport :: Flags -> String -> [(String,[Integer])] -> IO ()
makeReport hpcflags progName modTcs | xmlOutput hpcflags = do
@@
-261,5
+261,13
@@
xmlBBT (BBT b tt tf bt) = [("boxes",show b),("true",show tt),("false",show tf),(
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-report_options = [perModuleOpt,decListOpt,excludeOpt,includeOpt,hpcDirOpt,xmlOutputOpt]
+report_options
+ = perModuleOpt
+ . decListOpt
+ . excludeOpt
+ . includeOpt
+ . srcDirOpt
+ . hpcDirOpt
+ . xmlOutputOpt
+