hpc 0.6.0.0 → 0.6.0.1
raw patch · 6 files changed
+95/−87 lines, 6 filesdep ~basedep ~containersdep ~directorynew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, containers, directory, time
API changes (from Hackage documentation)
Files
- Trace/Hpc/Mix.hs +7/−5
- Trace/Hpc/Reflect.hsc +1/−19
- Trace/Hpc/Tix.hs +29/−28
- Trace/Hpc/Util.hs +20/−20
- changelog.md +11/−0
- hpc.cabal +27/−15
Trace/Hpc/Mix.hs view
@@ -1,11 +1,12 @@-#if __GLASGOW_HASKELL__ >= 701+{-# LANGUAGE CPP #-}+#ifdef __GLASGOW_HASKELL__ {-# LANGUAGE Trustworthy #-} #endif --------------------------------------------------------------- -- Colin Runciman and Andy Gill, June 2006 --------------------------------------------------------------- --- | Datatypes and file-access routines for the per-module (.mix)+-- | Datatypes and file-access routines for the per-module (@.mix@) -- indexes used by Hpc. module Trace.Hpc.Mix ( Mix(..)@@ -33,10 +34,11 @@ -- | 'Mix' is the information about a modules static properties, like -- location of Tix's in a file.--- tab stops are the size of a tab in the provided line:colunm values.+--+-- Tab stops are the size of a tab in the provided /line:colunm/ values.+-- -- * In GHC, this is 1 (a tab is just a character)--- * With hpc-tracer, this is 8 (a tab represents several spaces).-+-- * With @hpc-tracer@, this is 8 (a tab represents several spaces). data Mix = Mix FilePath -- location of original file UTCTime -- time of original file's last update
Trace/Hpc/Reflect.hsc view
@@ -1,5 +1,5 @@ {-# LANGUAGE ForeignFunctionInterface #-}-#if __GLASGOW_HASKELL__ >= 701+#ifdef __GLASGOW_HASKELL__ {-# LANGUAGE Trustworthy #-} #endif @@ -11,22 +11,6 @@ import Trace.Hpc.Tix -#if __GLASGOW_HASKELL__ < 608---- Older GHCs don't have the info in the header files for the real--- contents of this module to compile--clearTix :: IO ()-clearTix = error "clearTix not defined for GHC < 6.8"--examineTix :: IO Tix-examineTix = error "examineTix not defined for GHC < 6.8"--updateTix :: Tix -> IO ()-updateTix = error "updateTix not defined for GHC < 6.8"--#else- import Foreign.C.String import Foreign.Marshal.Array import Foreign.Ptr@@ -93,6 +77,4 @@ else True ] return ()--#endif
Trace/Hpc/Tix.hs view
@@ -1,31 +1,33 @@-#if __GLASGOW_HASKELL__ >= 701+{-# LANGUAGE CPP #-}+#ifdef __GLASGOW_HASKELL__ {-# LANGUAGE Safe #-} #endif ------------------------------------------------------------ -- Andy Gill and Colin Runciman, June 2006 ------------------------------------------------------------ --- | Datatypes and file-access routines for the tick data file --- used by HPC. (.tix)-module Trace.Hpc.Tix(Tix(..), TixModule(..), - tixModuleName, tixModuleHash, tixModuleTixs,- readTix, writeTix, getTixFileName) where+-- | Datatypes and file-access routines for the tick data file+-- (@.tix@) used by Hpc.+module Trace.Hpc.Tix(Tix(..), TixModule(..),+ tixModuleName, tixModuleHash, tixModuleTixs,+ readTix, writeTix, getTixFileName) where import Data.List (isSuffixOf) import Trace.Hpc.Util (Hash, catchIO) --- 'Tix ' is the storage format for our dynamic imformation about what--- boxes are ticked.+-- | 'Tix' is the storage format for our dynamic imformation about+-- what boxes are ticked. data Tix = Tix [TixModule]- deriving (Read, Show, Eq)+ deriving (Read, Show, Eq) -data TixModule = TixModule - String -- module name- Hash -- hash number- Int -- length of tix list (allows pre-allocation at parse time).- [Integer] -- actual ticks- deriving (Read, Show, Eq)+data TixModule = TixModule+ String -- module name+ Hash -- hash number+ Int -- length of Tix list (allows pre-allocation at parse time).+ [Integer] -- actual ticks+ deriving (Read, Show, Eq) +-- TODO: Turn extractors below into proper 'TixModule' field-labels tixModuleName :: TixModule -> String tixModuleName (TixModule nm _ _ _) = nm tixModuleHash :: TixModule -> Hash@@ -35,7 +37,7 @@ -- We /always/ read and write Tix from the current working directory. --- read a Tix File.+-- | Read a @.tix@ File. readTix :: String -> IO (Maybe Tix) readTix tix_filename =@@ -43,11 +45,11 @@ return $ Just $ read contents) (\ _ -> return $ Nothing) --- write a Tix File.-writeTix :: String - -> Tix - -> IO ()-writeTix name tix = +-- | Write a @.tix@ File.+writeTix :: String+ -> Tix+ -> IO ()+writeTix name tix = writeFile name (show tix) {-@@ -55,11 +57,10 @@ tixName name = name ++ ".tix" -} --- getTixFullName takes a binary or .tix-file name,--- and normalizes it into a .tix-file name.+-- | 'getTixFullName' takes a binary or @.tix@-file name,+-- and normalizes it into a @.tix@-file name. getTixFileName :: String -> String-getTixFileName str | ".tix" `isSuffixOf` str - = str- | otherwise- = str ++ ".tix"-+getTixFileName str | ".tix" `isSuffixOf` str+ = str+ | otherwise+ = str ++ ".tix"
Trace/Hpc/Util.hs view
@@ -1,4 +1,5 @@-#if __GLASGOW_HASKELL__ >= 701+{-# LANGUAGE CPP #-}+#ifdef __GLASGOW_HASKELL__ {-# LANGUAGE Safe #-} #endif -----------------------------------------@@ -21,26 +22,26 @@ import Data.List(foldl') import Data.Char (ord) import Data.Bits (xor)-import Data.Word +import Data.Word --- | 'HpcPos' is an Hpc local rendition of a Span. +-- | 'HpcPos' is an Hpc local rendition of a Span. data HpcPos = P !Int !Int !Int !Int deriving (Eq, Ord) --- | 'fromHpcPos' explodes the HpcPos into line:column-line:colunm+-- | 'fromHpcPos' explodes the HpcPos into /line:column/-/line:colunm/ fromHpcPos :: HpcPos -> (Int,Int,Int,Int) fromHpcPos (P l1 c1 l2 c2) = (l1,c1,l2,c2) --- | 'toHpcPos' implodes to HpcPos, from line:column-line:colunm+-- | 'toHpcPos' implodes to HpcPos, from /line:column/-/line:colunm/ toHpcPos :: (Int,Int,Int,Int) -> HpcPos toHpcPos (l1,c1,l2,c2) = P l1 c1 l2 c2 --- | asks the question, is the first argument inside the second argument.+-- | Predicate determining whether the first argument is inside the second argument. insideHpcPos :: HpcPos -> HpcPos -> Bool-insideHpcPos small big = - sl1 >= bl1 &&- (sl1 /= bl1 || sc1 >= bc1) &&- sl2 <= bl2 &&- (sl2 /= bl2 || sc2 <= bc2)+insideHpcPos small big =+ sl1 >= bl1 &&+ (sl1 /= bl1 || sc1 >= bc1) &&+ sl2 <= bl2 &&+ (sl2 /= bl2 || sc2 <= bc2) where (sl1,sc1,sl2,sc2) = fromHpcPos small (bl1,bc1,bl2,bc2) = fromHpcPos big @@ -52,11 +53,11 @@ where (before,after) = span (/= ',') pos (lhs0,rhs0) = case span (/= '-') before of- (lhs,'-':rhs) -> (lhs,rhs)- (lhs,"") -> (lhs,lhs)- _ -> error "bad parse"- (l1,':':c1) = span (/= ':') lhs0- (l2,':':c2) = span (/= ':') rhs0+ (lhs,'-':rhs) -> (lhs,rhs)+ (lhs,"") -> (lhs,lhs)+ _ -> error "bad parse"+ (l1,':':c1) = span (/= ':') lhs0+ (l2,':':c2) = span (/= ':') rhs0 ------------------------------------------------------------------------------ @@ -68,9 +69,9 @@ newtype Hash = Hash Word32 deriving (Eq) instance Read Hash where- readsPrec p n = [ (Hash v,rest) - | (v,rest) <- readsPrec p n - ]+ readsPrec p n = [ (Hash v,rest)+ | (v,rest) <- readsPrec p n+ ] instance Show Hash where showsPrec p (Hash n) = showsPrec p n@@ -111,4 +112,3 @@ catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a catchIO = Exception.catch-
+ changelog.md view
@@ -0,0 +1,11 @@+# Changelog for [`hpc` package](http://hackage.haskell.org/package/hpc)++## 0.6.0.1 *Mar 2014*++ * Bundled with GHC 7.8.1++ * Update to Cabal 1.10 format++ * Drop support for GHC prior to version 7.2.2++ * Minor improvements to Haddock docs
hpc.cabal view
@@ -1,35 +1,47 @@ name: hpc-version: 0.6.0.0+version: 0.6.0.1+-- GHC 7.6.1 released with 0.6.0.0 license: BSD3 license-file: LICENSE author: Andy Gill maintainer: libraries@haskell.org-bug-reports: http://hackage.haskell.org/trac/ghc/newticket?component=Code%20Coverage+bug-reports: http://ghc.haskell.org/trac/ghc/newticket?component=Code%20Coverage category: Control synopsis: Code Coverage Library for Haskell build-type: Simple-Cabal-Version: >= 1.6+cabal-version:>=1.10+tested-with: GHC==7.6.3, GHC==7.6.2, GHC==7.6.1, GHC==7.4.2, GHC==7.4.1, GHC==7.2.2+description:+ This package provides the code coverage library for Haskell.+ .+ See <http://www.haskell.org/haskellwiki/Haskell_program_coverage> for more+ information. +extra-source-files:+ changelog.md+ source-repository head type: git- location: http://darcs.haskell.org/packages/hpc.git/+ location: http://git.haskell.org/packages/hpc.git -Flag small_base- Description: Choose the new smaller, split-up base package.+source-repository this+ type: git+ location: http://git.haskell.org/packages/hpc.git+ tag: hpc-0.6.0.1-release Library+ default-language: Haskell98+ other-extensions: CPP+ exposed-modules: Trace.Hpc.Util Trace.Hpc.Mix Trace.Hpc.Tix Trace.Hpc.Reflect- extensions: CPP- if flag(small_base)- Build-Depends: base >= 3 && < 5,- directory >= 1 && < 1.3,- time < 1.5,- containers >= 0.1 && < 0.6- else- Build-Depends: base < 3- ghc-options: -Wall + Build-Depends:+ base >= 4.4.1 && < 4.8,+ containers >= 0.4.1 && < 0.6,+ directory >= 1.1 && < 1.3,+ time >= 1.2 && < 1.5+ ghc-options: -Wall