diff options
-rw-r--r-- | Setup.hs | 7 | ||||
-rw-r--r-- | pandoc.cabal | 16 |
2 files changed, 15 insertions, 8 deletions
@@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + import Distribution.Simple import Distribution.Simple.Setup (copyDest, copyVerbosity, fromFlag, installVerbosity, BuildFlags(..)) @@ -20,6 +22,7 @@ import System.Time import System.IO.Error ( isDoesNotExistError ) import Data.Maybe ( catMaybes ) import Data.List ( (\\) ) +import Data.Time.Clock (UTCTime(..)) main :: IO () main = do @@ -82,7 +85,11 @@ modifiedDependencies :: FilePath -> [FilePath] -> IO [FilePath] modifiedDependencies file dependencies = do fileModTime <- catch (getModificationTime file) $ \e -> if isDoesNotExistError e +#if __GLASGOW_HASKELL__ >= 706 + then return (UTCTime (toEnum 0) 0) -- the minimum ClockTime +#else then return (TOD 0 0) -- the minimum ClockTime +#endif else ioError e depModTimes <- mapM getModificationTime dependencies let modified = zipWith (\dep time -> if time > fileModTime then Just dep else Nothing) dependencies depModTimes diff --git a/pandoc.cabal b/pandoc.cabal index 0b234c52f..a5e4f5a83 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -199,13 +199,13 @@ Library -- Note: the following is duplicated in all stanzas. -- It needs to be duplicated because of the library & executable flags. -- BEGIN DUPLICATED SECTION - Build-Depends: containers >= 0.1 && < 0.5, + Build-Depends: containers >= 0.1 && < 0.6, parsec >= 3.1 && < 3.2, mtl >= 1.1 && < 2.2, - network >= 2 && < 2.4, + network >= 2 && < 2.5, filepath >= 1.1 && < 1.4, process >= 1 && < 1.2, - directory >= 1 && < 1.2, + directory >= 1 && < 1.3, bytestring >= 0.9 && < 1.0, zip-archive >= 0.1.1.7 && < 0.2, utf8-string >= 0.3 && < 0.4, @@ -311,13 +311,13 @@ Executable pandoc -- Note: the following is duplicated in all stanzas. -- It needs to be duplicated because of the library & executable flags. -- BEGIN DUPLICATED SECTION - Build-Depends: containers >= 0.1 && < 0.5, + Build-Depends: containers >= 0.1 && < 0.6, parsec >= 3.1 && < 3.2, mtl >= 1.1 && < 2.2, - network >= 2 && < 2.4, + network >= 2 && < 2.5, filepath >= 1.1 && < 1.4, process >= 1 && < 1.2, - directory >= 1 && < 1.2, + directory >= 1 && < 1.3, bytestring >= 0.9 && < 1.0, zip-archive >= 0.1.1.7 && < 0.2, utf8-string >= 0.3 && < 0.4, @@ -386,7 +386,7 @@ Test-Suite test-pandoc pandoc-types >= 1.10 && < 1.11, utf8-string >= 0.3 && < 0.4, bytestring >= 0.9 && < 1.0, - directory >= 1 && < 1.2, + directory >= 1 && < 1.3, filepath >= 1.1 && < 1.4, process >= 1 && < 1.2, Diff, @@ -396,7 +396,7 @@ Test-Suite test-pandoc QuickCheck >= 2.4 && < 2.6, HUnit >= 1.2 && < 1.3, template-haskell >= 2.4 && < 2.8, - containers >= 0.1 && < 0.5, + containers >= 0.1 && < 0.6, ansi-terminal == 0.5.* Other-Modules: Tests.Old Tests.Helpers |