X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fhpc%2FHpcReport.hs;h=2950cbf253a6b37705a36da2e44dfb45c27047fc;hb=4799dfb37be922c17451f8e0f7c8d765a7a7eaab;hp=8f063f83006887a4d94a40b59fb047887264aab9;hpb=858a055da9f768dd20268cdddb3a3b7c904e83ef;p=ghc-hetmet.git diff --git a/utils/hpc/HpcReport.hs b/utils/hpc/HpcReport.hs index 8f063f8..2950cbf 100644 --- a/utils/hpc/HpcReport.hs +++ b/utils/hpc/HpcReport.hs @@ -152,7 +152,7 @@ single (BinBox {}) = False 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)} @@ -225,9 +225,9 @@ report_main hpcflags (progName:mods) = do | 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 @@ -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 +