hpc 0.5.1.1 → 0.6.0.0
raw patch · 3 files changed
+7/−20 lines, 3 filesdep +timedep −old-timedep ~containersdep ~directoryPVP ok
version bump matches the API change (PVP)
Dependencies added: time
Dependencies removed: old-time
Dependency ranges changed: containers, directory
API changes (from Hackage documentation)
- Trace.Hpc.Mix: getModificationTime :: FilePath -> IO Integer
- Trace.Hpc.Mix: Mix :: FilePath -> Integer -> Hash -> Int -> [MixEntry] -> Mix
+ Trace.Hpc.Mix: Mix :: FilePath -> UTCTime -> Hash -> Int -> [MixEntry] -> Mix
Files
- Trace/Hpc/Mix.hs +2/−15
- Trace/Hpc/Util.hs +1/−1
- hpc.cabal +4/−4
Trace/Hpc/Mix.hs view
@@ -14,15 +14,13 @@ , CondBox(..) , mixCreate , readMix- , Trace.Hpc.Mix.getModificationTime , createMixEntryDom , MixEntryDom ) where -import System.Time (ClockTime(..))-import System.Directory (getModificationTime) import Data.Maybe (catMaybes)+import Data.Time import Data.Tree import Data.Char @@ -41,16 +39,12 @@ data Mix = Mix FilePath -- location of original file- Integer -- time (in seconds) of original file's last update, since 1970.+ UTCTime -- time of original file's last update Hash -- hash of mix entry + timestamp Int -- tab stop value. [MixEntry] -- entries deriving (Show,Read) --- We would rather use ClockTime in Mix, but ClockTime has no Read instance in 6.4 and before,--- but does in 6.6. Definining the instance for ClockTime here is the Wrong Thing to do,--- because if some other program also defined that instance, we will not be able to compile.- type MixEntry = (HpcPos, BoxLabel) data BoxLabel = ExpBox Bool -- isAlt@@ -110,13 +104,6 @@ mixName :: FilePath -> String -> String mixName dirName name = dirName ++ "/" ++ name ++ ".mix"---- | Get modification time of a file.--getModificationTime :: FilePath -> IO Integer-getModificationTime file = do- (TOD sec _) <- System.Directory.getModificationTime file- return $ sec ------------------------------------------------------------------------------
Trace/Hpc/Util.hs view
@@ -101,7 +101,7 @@ toHash xs = foldl' (\ h c -> toHash c `hxor` (h * 33)) 5381 xs instance (HpcHash a,HpcHash b) => HpcHash (a,b) where- toHash (a,b) = toHash a * 33 `hxor` toHash b+ toHash (a,b) = (toHash a * 33) `hxor` toHash b instance HpcHash HpcPos where toHash (P a b c d) = Hash $ fromIntegral $ a * 0x1000000 + b * 0x10000 + c * 0x100 + d
hpc.cabal view
@@ -1,5 +1,5 @@ name: hpc-version: 0.5.1.1+version: 0.6.0.0 license: BSD3 license-file: LICENSE author: Andy Gill@@ -26,9 +26,9 @@ extensions: CPP if flag(small_base) Build-Depends: base >= 3 && < 5,- directory >= 1 && < 1.2,- old-time >= 1 && < 1.2,- containers >= 0.1 && < 0.5+ directory >= 1 && < 1.3,+ time < 1.5,+ containers >= 0.1 && < 0.6 else Build-Depends: base < 3 ghc-options: -Wall