diff --git a/ghc-mod.cabal b/ghc-mod.cabal index b8b8028..529033b 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -156,6 +156,7 @@ Executable ghc-modi , containers , directory , filepath + , old-time , process , split , time diff --git a/src/Misc.hs b/src/Misc.hs index eeb84d5..fe0a4d2 100644 --- a/src/Misc.hs +++ b/src/Misc.hs @@ -26,7 +26,11 @@ import CoreMonad (liftIO) import Data.IORef (IORef, newIORef, readIORef, writeIORef) import Data.List (isPrefixOf) import Data.Maybe (isJust) +#if __GLASGOW_HASKELL__ <= 704 +import System.Time (ClockTime) +#else import Data.Time (UTCTime) +#endif import Data.Typeable (Typeable) import System.Directory (getModificationTime, doesDirectoryExist, getDirectoryContents) import System.IO (openBinaryFile, IOMode(..)) @@ -50,7 +54,11 @@ instance Exception Restart ---------------------------------------------------------------- data World = World { +#if __GLASGOW_HASKELL__ <= 704 + worldCabalFileModificationTime :: Maybe ClockTime +#else worldCabalFileModificationTime :: Maybe UTCTime +#endif } deriving (Show, Eq) getCurrentWorld :: IOish m => GhcModT m World