Permalink
Browse files

mods of Dirk Ullrich, for time compat, in slightly modified form

  • Loading branch information...
1 parent f091db9 commit a751ee89c031afb0a9e341057edaa296f9570ab2 @atzedijkstra atzedijkstra committed Nov 29, 2012
Showing with 14 additions and 3 deletions.
  1. +11 −0 src/UHC/Util/FPath.hs
  2. +3 −3 uhc-util.cabal
View
@@ -36,6 +36,8 @@ module UHC.Util.FPath
, filePathMkPrefix, filePathUnPrefix
, filePathCoalesceSeparator
, filePathMkAbsolute, filePathUnAbsolute
+
+ , fpathGetModificationTime
)
where
@@ -46,6 +48,7 @@ import System.IO
import System.Directory
import UHC.Util.Utils
+import UHC.Util.Time
-------------------------------------------------------------------------------------------
-- Making prefix and inverse, where a prefix has a tailing '/'
@@ -351,3 +354,11 @@ searchPathForReadableFile paths suffs fp
= do fs <- searchPathForReadableFiles True paths suffs fp
return (listToMaybe fs)
+-------------------------------------------------------------------------------------------
+-- Get modification time, with old-time + time compatibility
+-------------------------------------------------------------------------------------------
+
+fpathGetModificationTime :: FPath -> IO UTCTime
+fpathGetModificationTime fp = do let fn = fpathToStr fp
+ t <- getModificationTime fn
+ return (toUTCTime t)
View
@@ -19,15 +19,15 @@ library
mtl >= 2 && < 3,
fgl >= 5.4 && < 6.0,
hashable >= 1.1 && < 1.2,
- containers >= 0.4 && < 0.5,
+ containers >= 0.4 && < 0.6,
directory >= 1.1 && < 2,
- array >= 0.4 && < 0.5,
+ array >= 0.3 && < 0.5,
process >= 1.1 && < 1.2,
binary >= 0.5 && < 1,
bytestring >= 0.9 && < 1,
uulib >= 0.9 && < 1,
time-compat >= 0.1.0.1 && < 0.2,
- time >= 1.4 && < 2
+ time >= 1.2 && < 1.5
Exposed-Modules:
UHC.Util.AGraph,
UHC.Util.Binary,

0 comments on commit a751ee8

Please sign in to comment.