X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fhpc%2FHpcShowTix.hs;h=efeb19e275bfd4bb8d62bb0b088d28a9a053e2bb;hb=59b01a2fb6cd6a9af37f5fd6775f574bc53af02a;hp=b81f88cbffb3e4c4bf0a63600665c4209ef2d557;hpb=5f4e77a5a2ea03286b795da4051272ac7c774bd7;p=ghc-hetmet.git diff --git a/utils/hpc/HpcShowTix.hs b/utils/hpc/HpcShowTix.hs index b81f88c..efeb19e 100644 --- a/utils/hpc/HpcShowTix.hs +++ b/utils/hpc/HpcShowTix.hs @@ -2,12 +2,12 @@ module HpcShowTix (showtix_plugin) where import Trace.Hpc.Mix import Trace.Hpc.Tix -import Trace.Hpc.Util import HpcFlags import qualified HpcSet as Set +showtix_options :: FlagOptSeq showtix_options = excludeOpt . includeOpt @@ -15,6 +15,7 @@ showtix_options . hpcDirOpt . outputOpt +showtix_plugin :: Plugin showtix_plugin = Plugin { name = "show" , usage = "[OPTION] .. [ [ ..]]" , options = showtix_options @@ -25,8 +26,8 @@ showtix_plugin = Plugin { name = "show" } - -showtix_main flags [] = hpcError showtix_plugin $ "no .tix file or executable name specified" +showtix_main :: Flags -> [String] -> IO () +showtix_main _ [] = hpcError showtix_plugin $ "no .tix file or executable name specified" showtix_main flags (prog:modNames) = do let hpcflags1 = flags { includeMods = Set.fromList modNames @@ -38,7 +39,7 @@ showtix_main flags (prog:modNames) = do Nothing -> hpcError showtix_plugin $ "could not read .tix file : " ++ prog Just (Tix tixs) -> do tixs_mixs <- sequence - [ do mix <- readMixWithFlags hpcflags1 tix + [ do mix <- readMixWithFlags hpcflags1 (Right tix) return $ (tix,mix) | tix <- tixs , allowModule hpcflags1 (tixModuleName tix) @@ -50,10 +51,10 @@ showtix_main flags (prog:modNames) = do sequence_ [ sequence_ [ putStrLn (rjust 5 (show ix) ++ " " ++ rjust 10 (show count) ++ " " ++ ljust 20 modName ++ " " ++ rjust 20 (show pos) ++ " " ++ show lab) - | (count,ix,(pos,lab)) <- zip3 tixs [(0::Int)..] entries + | (count,ix,(pos,lab)) <- zip3 tixs' [(0::Int)..] entries ] - | ( TixModule modName hash _ tixs - , Mix _file _timestamp _hash _tab entries + | ( TixModule modName _hash1 _ tixs' + , Mix _file _timestamp _hash2 _tab entries ) <- tixs_mixs ]