ghc-prof 1.3.0.1 → 1.3.0.2
raw patch · 2 files changed
+16/−7 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ghc-prof.cabal +2/−2
- src/GHC/Prof/Parser.hs +14/−5
ghc-prof.cabal view
@@ -1,5 +1,5 @@ name: ghc-prof-version: 1.3.0.1+version: 1.3.0.2 synopsis: Library for parsing GHC time and allocation profiling reports description: Library for parsing GHC time and allocation profiling reports homepage: https://github.com/maoe/ghc-prof@@ -11,7 +11,7 @@ category: Development build-type: Simple cabal-version: >=1.10-tested-with: GHC >= 7.6 && <= 8.0.1+tested-with: GHC >= 7.6 && <= 8.0.2 flag dump description: Build the executable "dump"
src/GHC/Prof/Parser.hs view
@@ -22,11 +22,12 @@ import Data.Char (isSpace) import Data.Foldable (asum, foldl') import Data.Maybe-import Data.Text (Text) import Data.Time-import qualified Data.Set as Set +import Data.Text (Text) import Data.Attoparsec.Text as A+import qualified Data.Set as Set+import qualified Data.Text as T import Control.Monad.Extras (seqM) import GHC.Prof.Types@@ -167,7 +168,7 @@ <*> optional decimal <* skipHorizontalSpace -- bytes where source- | headerHasSrc = Just <$> symbol+ | headerHasSrc = Just <$> sourceSpan | otherwise = pure Nothing costCentres :: Parser CostCentreTree@@ -181,8 +182,8 @@ modName <- symbol; skipHorizontalSpace src <- if headerHasSrc then do- !sym <- symbol- return $! Just sym+ !sym <- sourceSpan+ return $ Just sym else pure Nothing skipHorizontalSpace no <- decimal; skipHorizontalSpace@@ -328,6 +329,14 @@ symbol :: Parser Text symbol = A.takeWhile $ not . isSpace++sourceSpan :: Parser Text+sourceSpan = asum+ [ T.pack <$> angleBrackets+ , symbol+ ]+ where+ angleBrackets = (:) <$> char '<' <*> manyTill anyChar (char '>') skipHorizontalSpace :: Parser () skipHorizontalSpace = void $ A.takeWhile isHorizontalSpace