--- snap-loader-dynamic-0.9.0.1-orig/snap-loader-dynamic.cabal 2012-10-01 14:36:59.000000000 +1000 +++ snap-loader-dynamic-0.9.0.1/snap-loader-dynamic.cabal 2012-10-20 21:09:56.107416081 +1100 @@ -32,16 +32,16 @@ hint >= 0.3.3.1 && < 0.4, old-time >= 1.0 && < 1.2, base >= 4 && < 5, - directory >= 1.0 && < 1.2, - directory-tree >= 0.10 && < 0.11, + directory >= 1.0 && < 1.3, + directory-tree >= 0.10 && < 0.12, mtl > 2.0 && < 2.2, snap-core >= 0.9 && < 0.10, time >= 1.1 && < 1.5, - template-haskell >= 2.2 && < 2.8 + template-haskell >= 2.2 && < 2.9 if !os(windows) build-depends: - unix >= 2.2.0.0 && < 2.6 + unix >= 2.2.0.0 && < 2.7 if impl(ghc >= 6.12.0) ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2 --- snap-loader-dynamic-0.9.0.1-orig/src/Snap/Loader/Dynamic/TreeWatcher.hs 2012-10-01 14:36:59.000000000 +1000 +++ snap-loader-dynamic-0.9.0.1/src/Snap/Loader/Dynamic/TreeWatcher.hs 2012-10-11 19:50:59.268185367 +1100 @@ -1,4 +1,5 @@ -module Snap.Loader.Dynamic.TreeWatcher +{-# LANGUAGE CPP #-} + module Snap.Loader.Dynamic.TreeWatcher ( TreeStatus , getTreeStatus , checkTreeStatus @@ -9,7 +10,9 @@ import System.Directory import System.Directory.Tree import System.Time - +#if MIN_VERSION_directory(1,2,0) +import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds) +#endif ------------------------------------------------------------------------------ -- | An opaque representation of the contents and last modification @@ -37,4 +40,10 @@ -- list of filepaths into a list of 'AnchoredDirTree' annotated with -- the modification times of the files located in those paths. readModificationTimes :: [FilePath] -> IO [AnchoredDirTree ClockTime] +#if MIN_VERSION_directory(1,2,0) +readModificationTimes = mapM $ readDirectoryWith getModificationTime' + where + getModificationTime' path = getModificationTime path >>= (\x -> return $ TOD ((toEnum . fromEnum . utcTimeToPOSIXSeconds) x) 0) +#else readModificationTimes = mapM $ readDirectoryWith getModificationTime +#endif