[commit: hpc] master: Switch to using the time package, rather than old-time (dd3ba27)
Ian Lynagh
igloo at earth.li
Sat Jan 14 20:37:48 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/hpc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/dd3ba275911a897c421ca084057aad76c38bd4a5
>---------------------------------------------------------------
commit dd3ba275911a897c421ca084057aad76c38bd4a5
Author: Ian Lynagh <igloo at earth.li>
Date: Sat Jan 14 17:07:49 2012 +0000
Switch to using the time package, rather than old-time
>---------------------------------------------------------------
Trace/Hpc/Mix.hs | 17 ++---------------
hpc.cabal | 2 +-
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/Trace/Hpc/Mix.hs b/Trace/Hpc/Mix.hs
index 80009c5..d1533e2 100644
--- a/Trace/Hpc/Mix.hs
+++ b/Trace/Hpc/Mix.hs
@@ -14,15 +14,13 @@ module Trace.Hpc.Mix
, 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 @@ import Trace.Hpc.Tix
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
@@ -111,13 +105,6 @@ readMix dirNames mod' = do
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
-
------------------------------------------------------------------------------
type MixEntryDom a = Tree (HpcPos,a)
diff --git a/hpc.cabal b/hpc.cabal
index d4fcf43..10ffb13 100644
--- a/hpc.cabal
+++ b/hpc.cabal
@@ -27,7 +27,7 @@ Library
if flag(small_base)
Build-Depends: base >= 3 && < 5,
directory >= 1 && < 1.2,
- old-time >= 1 && < 1.1,
+ time < 1.5,
containers >= 0.1 && < 0.5
else
Build-Depends: base < 3
More information about the Cvs-libraries
mailing list