ghc-prof 1.4.1.5 → 1.4.1.6
raw patch · 4 files changed
+28/−5 lines, 4 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- ghc-prof.cabal +3/−3
- src/GHC/Prof.hs +5/−1
- tests/Regression.hs +15/−1
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for ghc-prof +## v1.4.1.6 - 2019-09-09++* Relax upper version bound for base+* Test with newer versions of GHC+ ## v1.4.1.5 - 2018-12-20 * Relax upper version bound for tasty
ghc-prof.cabal view
@@ -1,5 +1,5 @@ name: ghc-prof-version: 1.4.1.5+version: 1.4.1.6 synopsis: Library for parsing GHC time and allocation profiling reports description: ghc-prof is a library for parsing GHC time and allocation profiling reports. homepage: https://github.com/maoe/ghc-prof@@ -14,7 +14,7 @@ CHANGELOG.md README.md cabal-version: >=1.10-tested-with: GHC >= 7.6 && <= 8.6.3+tested-with: GHC >= 7.6 && <= 8.8.1 flag dump description: Build the executable "dump"@@ -29,7 +29,7 @@ other-modules: Control.Monad.Extras build-depends:- base >= 4.6 && < 4.13+ base >= 4.6 && < 4.14 , attoparsec < 0.14 , containers >= 0.5 && < 0.7 , scientific < 0.4
src/GHC/Prof.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} module GHC.Prof ( decode , decode'@@ -29,12 +30,15 @@ , AggregateModule(..) ) where +#if !MIN_VERSION_base(4, 13, 0)+import Control.Applicative ((<*))+#endif+ import qualified Data.Attoparsec.Text.Lazy as ATL import qualified Data.Attoparsec.Text as AT import qualified Data.Text.Lazy as TL import qualified Data.Text as T -import Control.Applicative ((<*)) import GHC.Prof.CostCentreTree import GHC.Prof.Parser (profile) import GHC.Prof.Types
tests/Regression.hs view
@@ -7,6 +7,7 @@ import Data.Monoid import Data.Traversable import System.Directory+import System.Environment import System.FilePath import System.IO import Prelude@@ -49,12 +50,25 @@ , "fib n = fibs !! n" , "fibs = 0:1:zipWith (+) fibs (tail fibs)" ]- void $ readProcess "ghc" ["-prof", "-rtsopts", "-fforce-recomp", "hello.hs"] ""+ ghc <- findGhc+ void $ readProcess ghc ["-prof", "-rtsopts", "-fforce-recomp", "hello.hs"] "" for profilingFlags $ \(name, flag) -> do void $ readProcess "./hello" ["+RTS", flag, "-RTS"] "" let profName = "hello" <.> name <.> "prof" renameFile "hello.prof" profName return profName++findGhc :: IO String+findGhc = Prelude.foldr go (fail "cannot find a GHC")+ [ lookupEnv "HC"+ , findExecutable "ghc"+ ]+ where+ go act next = do+ r <- act+ case r of+ Just path -> return path+ Nothing -> next profilingFlags :: [(String, String)] profilingFlags =