Skip to content

Commit

Permalink
Fixed build for GHC 7.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
willdonnelly committed Oct 14, 2012
1 parent b335d62 commit c4db932
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
9 changes: 4 additions & 5 deletions Config/Dyre/Options.hs
Expand Up @@ -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

Expand Down
14 changes: 7 additions & 7 deletions Config/Dyre/Paths.hs
@@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions Config/Dyre/Relaunch.hs
@@ -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
Expand Down Expand Up @@ -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 )

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions dyre.cabal
@@ -1,5 +1,5 @@
name: dyre
version: 0.8.8
version: 0.8.9
category: Development, Configuration
synopsis: Dynamic reconfiguration in Haskell

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c4db932

Please sign in to comment.