diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-11-23 17:41:10 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-11-23 17:41:10 +0000 |
commit | 95027b829425b1a4f18f2cb197a0982cfaedcbe5 (patch) | |
tree | 849aee16d46e2002e18968876c1b3498d0211735 /utils/hpc/HpcShowTix.hs | |
parent | c04a98498cd1bd706ae9ce7b4c672af4b917a10e (diff) | |
download | haskell-95027b829425b1a4f18f2cb197a0982cfaedcbe5.tar.gz |
de-tab hpc
Diffstat (limited to 'utils/hpc/HpcShowTix.hs')
-rw-r--r-- | utils/hpc/HpcShowTix.hs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/utils/hpc/HpcShowTix.hs b/utils/hpc/HpcShowTix.hs index 7fd651550a..354ee066b0 100644 --- a/utils/hpc/HpcShowTix.hs +++ b/utils/hpc/HpcShowTix.hs @@ -8,7 +8,7 @@ import HpcFlags import qualified Data.Set as Set showtix_options :: FlagOptSeq -showtix_options +showtix_options = excludeOpt . includeOpt . srcDirOpt @@ -17,22 +17,22 @@ showtix_options showtix_plugin :: Plugin showtix_plugin = Plugin { name = "show" - , usage = "[OPTION] .. <TIX_FILE> [<MODULE> [<MODULE> ..]]" - , options = showtix_options - , summary = "Show .tix file in readable, verbose format" - , implementation = showtix_main - , init_flags = default_flags - , final_flags = default_final_flags - } + , usage = "[OPTION] .. <TIX_FILE> [<MODULE> [<MODULE> ..]]" + , options = showtix_options + , summary = "Show .tix file in readable, verbose format" + , implementation = showtix_main + , init_flags = default_flags + , final_flags = default_final_flags + } showtix_main :: Flags -> [String] -> IO () -showtix_main _ [] = hpcError showtix_plugin $ "no .tix file or executable name specified" +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 - `Set.union` - includeMods flags } + let hpcflags1 = flags + { includeMods = Set.fromList modNames + `Set.union` + includeMods flags } optTixs <- readTix (getTixFileName prog) case optTixs of @@ -42,12 +42,12 @@ showtix_main flags (prog:modNames) = do [ do mix <- readMixWithFlags hpcflags1 (Right tix) return $ (tix,mix) | tix <- tixs - , allowModule hpcflags1 (tixModuleName tix) + , allowModule hpcflags1 (tixModuleName tix) ] - - let rjust n str = take (n - length str) (repeat ' ') ++ str - let ljust n str = str ++ take (n - length str) (repeat ' ') - + + let rjust n str = take (n - length str) (repeat ' ') ++ str + let ljust n str = str ++ take (n - length str) (repeat ' ') + sequence_ [ sequence_ [ putStrLn (rjust 5 (show ix) ++ " " ++ rjust 10 (show count) ++ " " ++ ljust 20 modName ++ " " ++ rjust 20 (show pos) ++ " " ++ show lab) @@ -57,6 +57,6 @@ showtix_main flags (prog:modNames) = do , Mix _file _timestamp _hash2 _tab entries ) <- tixs_mixs ] - + return () |