diff options
author | andy@galois.com <unknown> | 2007-07-20 23:57:03 +0000 |
---|---|---|
committer | andy@galois.com <unknown> | 2007-07-20 23:57:03 +0000 |
commit | 4799dfb37be922c17451f8e0f7c8d765a7a7eaab (patch) | |
tree | a548c93155d94e67c4d3b07302f085412b36863e /utils/hpc/HpcShowTix.hs | |
parent | 30091f98d69664e7f748639749938dc3a0d5821e (diff) | |
download | haskell-4799dfb37be922c17451f8e0f7c8d765a7a7eaab.tar.gz |
hpc-tools: improving flag processing and help messages, small bug fixes.
Diffstat (limited to 'utils/hpc/HpcShowTix.hs')
-rw-r--r-- | utils/hpc/HpcShowTix.hs | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/utils/hpc/HpcShowTix.hs b/utils/hpc/HpcShowTix.hs index 4ed07fd892..c353e1b278 100644 --- a/utils/hpc/HpcShowTix.hs +++ b/utils/hpc/HpcShowTix.hs @@ -2,15 +2,18 @@ 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 = - [ excludeOpt,includeOpt,hpcDirOpt - , outputOpt - ] +showtix_options + = excludeOpt + . includeOpt + . srcDirOpt + . hpcDirOpt + . outputOpt showtix_plugin = Plugin { name = "show" , usage = "[OPTION] .. <TIX_FILE> [<MODULE> [<MODULE> ..]]" @@ -34,12 +37,11 @@ showtix_main flags (prog:modNames) = do case optTixs of Nothing -> hpcError showtix_plugin $ "could not read .tix file : " ++ prog Just (Tix tixs) -> do - let modules = map tixModuleName tixs - - mixs <- sequence - [ readMix (hpcDirs hpcflags1) modName -- hard wired to .hpc for now - | modName <- modules - , allowModule hpcflags1 modName + tixs_mixs <- sequence + [ do mix <- readMixWithFlags hpcflags1 (tixModuleName tix) + return $ (tix,mix) + | tix <- tixs + , allowModule hpcflags1 (tixModuleName tix) ] let rjust n str = take (n - length str) (repeat ' ') ++ str @@ -52,7 +54,8 @@ showtix_main flags (prog:modNames) = do ] | ( TixModule modName hash _ tixs , Mix _file _timestamp _hash _tab entries - ) <- zip tixs mixs + ) <- tixs_mixs ] return () + |