visual-prof 0.3 → 0.4
raw patch · 2 files changed
+5/−7 lines, 2 filesdep −parsec
Dependencies removed: parsec
Files
- Prof2Html.hs +3/−5
- visual-prof.cabal +2/−2
Prof2Html.hs view
@@ -21,7 +21,7 @@ import Text.RegexPR import Numeric import Data.List- + type Exp_ = Exp pprint tm = "<style> a.info{ position:relative; z-index:24; color:#000; text-decoration:none} a.info:hover{z-index:25;} a.info span{display: none} a.info:hover span{ /*the span will display just on :hover state*/ display:block; position:absolute; top:2em; left:2em; width:15em; border:1px solid #0cf; background-color:#cff; color:#000; text-align: center} </style><pre>"@@ -80,9 +80,7 @@ outputHTML file profName tm = do putStrLn "parsing profiling results" profFile <- lines <$> readFile profName- let prof = map (wordsBy (==' ')) $ takeWhile (/="") $ drop 9 profFile- {-when (profileTicks prof == 0)-}- {-(error "the program has to run longer to get enough information")-}+ let prof = filter ((all isDigit) . head) $ map (wordsBy (==' ')) $ takeWhile (/="") $ drop 9 profFile let profMap = IMap.fromList $ zip (map (read . (!!0)) prof) (map ((/100) . read . (!!2)) prof) putStrLn "printing output html file" let html = addColour profMap $ pprint tm@@ -100,7 +98,7 @@ let inpFile = ind args 4 let bak = file ++ ".bak" let profName = takeBaseName run ++ ".prof"- (do removeFile bak `catch`+ (do removeFile bak `Exc.catch` (\ e -> unless (isDoesNotExistError e) $ ioError e) renameFile file bak putStrLn "started parsing original file"
visual-prof.cabal view
@@ -1,5 +1,5 @@ Name: visual-prof-Version: 0.3+Version: 0.4 Cabal-Version: >= 1.2 License: BSD3 License-file: LICENSE@@ -38,7 +38,7 @@ Build-Depends: base >= 3 && < 5, containers else Build-Depends: base < 3- Build-depends: parsec, filepath, haskell-src-exts, regexpr, directory, process, pretty, mtl, uniplate, split+ Build-depends: filepath, haskell-src-exts, regexpr, directory, process, pretty, mtl, uniplate, split Main-is: Prof2Html.hs Other-modules: Pretty