Permalink
Browse files

Fixed build for GHC 7.6.1

  • Loading branch information...
1 parent b335d62 commit c4db932f17d04a9bf4fb07409fbcc2ba9e6284e7 @willdonnelly committed Oct 14, 2012
Showing with 19 additions and 18 deletions.
  1. +4 −5 Config/Dyre/Options.hs
  2. +7 −7 Config/Dyre/Paths.hs
  3. +5 −3 Config/Dyre/Relaunch.hs
  4. +3 −3 dyre.cabal
View
@@ -27,11 +27,10 @@ module Config.Dyre.Options
, getStatePersist
) where
-import Data.List
-import Data.Maybe
-import System.IO.Storage
-import System.Environment
-import System.Environment.Executable
+import Data.List (isPrefixOf)
+import Data.Maybe (fromJust)
+import System.IO.Storage (withStore, putValue, getValue, getDefaultValue)
+import System.Environment (getArgs, getExecutablePath, getProgName, withArgs)
import Config.Dyre.Params
View
@@ -1,11 +1,11 @@
module Config.Dyre.Paths where
-import System.Info
-import System.Time
-import System.FilePath
-import System.Directory
-import System.Environment.Executable
-import System.Environment.XDG.BaseDir
+import System.Info (os, arch)
+import System.FilePath ( (</>), (<.>), takeExtension )
+import System.Directory (getCurrentDirectory, doesFileExist, getModificationTime)
+import System.Environment.XDG.BaseDir (getUserCacheDir, getUserConfigDir)
+import System.Environment (getExecutablePath)
+import Data.Time
import Config.Dyre.Params
import Config.Dyre.Options
@@ -33,7 +33,7 @@ getPaths params@Params{projectName = pName} = do
-- | Check if a file exists. If it exists, return Just the modification
-- time. If it doesn't exist, return Nothing.
-maybeModTime :: FilePath -> IO (Maybe ClockTime)
+maybeModTime :: FilePath -> IO (Maybe UTCTime)
maybeModTime path = do
fileExists <- doesFileExist path
if fileExists
View
@@ -1,3 +1,5 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+
{-
This is the only other module aside from 'Config.Dyre' which needs
to be imported specially. It contains functions for restarting the
@@ -31,7 +33,7 @@ module Config.Dyre.Relaunch
import Data.Maybe ( fromMaybe, fromJust )
import System.IO ( writeFile, readFile )
import Data.Binary ( Binary, encodeFile, decodeFile )
-import System.IO.Error ( try )
+import Control.Exception ( try, SomeException )
import System.FilePath ( (</>) )
import System.Directory ( getTemporaryDirectory, removeFile )
@@ -101,8 +103,8 @@ restoreTextState d = do
stateData <- readFile sp
result <- try $ readIO stateData
case result of
- Left _ -> return d
- Right v -> return v
+ Left (_ :: SomeException) -> return d
+ Right v -> return v
-- | Restore state which has been serialized through the
-- 'saveBinaryState' function. Takes a default which is
View
@@ -1,5 +1,5 @@
name: dyre
-version: 0.8.8
+version: 0.8.9
category: Development, Configuration
synopsis: Dynamic reconfiguration in Haskell
@@ -42,8 +42,8 @@ library
Config.Dyre.Compile,
Config.Dyre.Relaunch
build-depends: base >= 4 && < 5, process, filepath,
- directory, ghc-paths, old-time, binary,
- executable-path, xdg-basedir, io-storage
+ directory, ghc-paths, time, binary,
+ xdg-basedir, io-storage
if os(windows)
build-depends: Win32

0 comments on commit c4db932

Please sign in to comment.