diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-12-28 13:05:08 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-12-28 13:06:36 -0400 |
commit | 851b792bd19fd4299fcf91e83116a31c1aa5352f (patch) | |
tree | a1eece20ac1f1b842e3cec21161703e3ce3b447c /Utility | |
parent | 8813a6a3ada14dd0adbe7cf105408b88e6b16b04 (diff) |
clean build warning on windows
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/Directory.hs | 2 | ||||
-rw-r--r-- | Utility/FileMode.hs | 3 | ||||
-rw-r--r-- | Utility/LockPool/LockHandle.hs | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/Utility/Directory.hs b/Utility/Directory.hs index fae33b5c2..fa9d14ff0 100644 --- a/Utility/Directory.hs +++ b/Utility/Directory.hs @@ -134,11 +134,13 @@ moveFile src dest = tryIO (rename src dest) >>= onrename _ <- tryIO $ removeFile tmp throwM e' +#ifndef mingw32_HOST_OS isdir f = do r <- tryIO $ getFileStatus f case r of (Left _) -> return False (Right s) -> return $ isDirectory s +#endif {- Removes a file, which may or may not exist, and does not have to - be a regular file. diff --git a/Utility/FileMode.hs b/Utility/FileMode.hs index efef5fa25..bb3780c6e 100644 --- a/Utility/FileMode.hs +++ b/Utility/FileMode.hs @@ -18,9 +18,10 @@ import System.PosixCompat.Types import Utility.PosixFiles #ifndef mingw32_HOST_OS import System.Posix.Files +import Control.Monad.IO.Class (liftIO) #endif +import Control.Monad.IO.Class (MonadIO) import Foreign (complement) -import Control.Monad.IO.Class (liftIO, MonadIO) import Control.Monad.Catch import Utility.Exception diff --git a/Utility/LockPool/LockHandle.hs b/Utility/LockPool/LockHandle.hs index ec36e6156..68c979b5d 100644 --- a/Utility/LockPool/LockHandle.hs +++ b/Utility/LockPool/LockHandle.hs @@ -10,7 +10,9 @@ module Utility.LockPool.LockHandle where import qualified Utility.LockPool.STM as P +#ifndef mingw32_HOST_OS import Utility.LockPool.STM (LockFile) +#endif import Control.Concurrent.STM import Control.Exception |