From b22409db3849ab14e72ad810aa6c17d2e7abf9e7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 28 Apr 2016 15:18:11 -0400 Subject: [PATCH] avoid warnings about not exported System.Directory.isSymbolicLink --- Annex/Fixup.hs | 1 - Assistant/Install/AutoStart.hs | 2 +- Build/Configure.hs | 2 +- Build/DesktopFile.hs | 2 +- Build/EvilLinker.hs | 2 +- Build/EvilSplicer.hs | 2 +- Build/LinuxMkLibs.hs | 1 - Build/NullSoftInstaller.hs | 2 +- Build/OSXMkLibs.hs | 1 - Build/Standalone.hs | 2 +- Build/TestConfig.hs | 2 +- Build/Version.hs | 2 +- Common.hs | 1 - Setup.hs | 2 +- Utility/Directory.hs | 7 +++++-- Utility/FreeDesktop.hs | 2 +- Utility/LinuxMkLibs.hs | 1 - Utility/LockFile/PidLock.hs | 1 - Utility/Path.hs | 2 +- Utility/Tmp.hs | 2 +- 20 files changed, 18 insertions(+), 21 deletions(-) diff --git a/Annex/Fixup.hs b/Annex/Fixup.hs index 35634f14ca..6a14f22bc9 100644 --- a/Annex/Fixup.hs +++ b/Annex/Fixup.hs @@ -20,7 +20,6 @@ import Utility.Exception import System.IO import System.FilePath -import System.Directory hiding (isSymbolicLink) import Data.List import Control.Monad import Control.Monad.IfElse diff --git a/Assistant/Install/AutoStart.hs b/Assistant/Install/AutoStart.hs index b2799101b1..99c2c0e41c 100644 --- a/Assistant/Install/AutoStart.hs +++ b/Assistant/Install/AutoStart.hs @@ -14,7 +14,7 @@ import Utility.FreeDesktop #ifdef darwin_HOST_OS import Utility.OSX import Utility.Path -import System.Directory hiding (isSymbolicLink) +import Utility.Directory #endif installAutoStart :: FilePath -> FilePath -> IO () diff --git a/Build/Configure.hs b/Build/Configure.hs index f0c3f7c331..ec3f4ccc43 100644 --- a/Build/Configure.hs +++ b/Build/Configure.hs @@ -4,7 +4,6 @@ module Build.Configure where -import System.Directory hiding (isSymbolicLink) import Control.Applicative import System.Environment (getArgs) import Control.Monad.IfElse @@ -20,6 +19,7 @@ import Utility.Env import Utility.Exception import qualified Git.Version import Utility.DottedVersion +import Utility.Directory tests :: [TestCase] tests = diff --git a/Build/DesktopFile.hs b/Build/DesktopFile.hs index f832f310c2..0203c02a60 100644 --- a/Build/DesktopFile.hs +++ b/Build/DesktopFile.hs @@ -15,12 +15,12 @@ import Utility.Exception import Utility.FreeDesktop import Utility.Path import Utility.Monad +import Utility.Directory import Config.Files import Utility.OSX import Assistant.Install.AutoStart import Assistant.Install.Menu -import System.Directory hiding (isSymbolicLink) import System.Environment #ifndef mingw32_HOST_OS import System.Posix.User diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs index 37885296fa..94e399dfe1 100644 --- a/Build/EvilLinker.hs +++ b/Build/EvilLinker.hs @@ -15,7 +15,6 @@ import Text.Parsec import Text.Parsec.String import Control.Applicative ((<$>)) import Control.Monad -import System.Directory hiding (isSymbolicLink) import Data.Maybe import Data.List @@ -23,6 +22,7 @@ import Utility.Monad import Utility.Process hiding (env) import qualified Utility.Process import Utility.Env +import Utility.Directory data CmdParams = CmdParams { cmd :: String diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs index dc71a992c2..cfdcc3a6f5 100644 --- a/Build/EvilSplicer.hs +++ b/Build/EvilSplicer.hs @@ -39,7 +39,6 @@ import Data.String.Utils import Data.Char import System.Environment import System.FilePath -import System.Directory hiding (isSymbolicLink) import System.IO import Control.Monad import Prelude hiding (log) @@ -49,6 +48,7 @@ import Utility.Misc import Utility.Exception hiding (try) import Utility.Path import Utility.FileSystemEncoding +import Utility.Directory data Coord = Coord { coordLine :: Int diff --git a/Build/LinuxMkLibs.hs b/Build/LinuxMkLibs.hs index 81cf834ef5..3bc79fed49 100644 --- a/Build/LinuxMkLibs.hs +++ b/Build/LinuxMkLibs.hs @@ -12,7 +12,6 @@ module Main where import System.Environment import Data.Maybe import System.FilePath -import System.Directory hiding (isSymbolicLink) import Control.Monad import Data.List import System.Posix.Files diff --git a/Build/NullSoftInstaller.hs b/Build/NullSoftInstaller.hs index b8c9880620..7ce470bc9b 100644 --- a/Build/NullSoftInstaller.hs +++ b/Build/NullSoftInstaller.hs @@ -21,7 +21,6 @@ {-# LANGUAGE OverloadedStrings, FlexibleContexts #-} import Development.NSIS -import System.Directory hiding (isSymbolicLink) import System.FilePath import Control.Monad import Control.Applicative @@ -36,6 +35,7 @@ import Utility.CopyFile import Utility.SafeCommand import Utility.Process import Utility.Exception +import Utility.Directory import Build.BundledPrograms main = do diff --git a/Build/OSXMkLibs.hs b/Build/OSXMkLibs.hs index 8be73babe9..948b0d5a35 100644 --- a/Build/OSXMkLibs.hs +++ b/Build/OSXMkLibs.hs @@ -10,7 +10,6 @@ module Main where import System.Environment (getArgs) import Data.Maybe import System.FilePath -import System.Directory hiding (isSymbolicLink) import Control.Monad import Control.Monad.IfElse import Data.List diff --git a/Build/Standalone.hs b/Build/Standalone.hs index 48e96f952a..5cb09cd609 100644 --- a/Build/Standalone.hs +++ b/Build/Standalone.hs @@ -12,12 +12,12 @@ module Main where import Control.Monad.IfElse import System.Environment import System.FilePath -import System.Directory hiding (isSymbolicLink) import Control.Monad import Build.BundledPrograms import Utility.SafeCommand import Utility.Path +import Utility.Directory progDir :: FilePath -> FilePath #ifdef darwin_HOST_OS diff --git a/Build/TestConfig.hs b/Build/TestConfig.hs index b7766d6c4d..79979c5fb0 100644 --- a/Build/TestConfig.hs +++ b/Build/TestConfig.hs @@ -7,10 +7,10 @@ module Build.TestConfig where import Utility.Path import Utility.Monad import Utility.SafeCommand +import Utility.Directory import System.IO import System.FilePath -import System.Directory hiding (isSymbolicLink) type ConfigKey = String data ConfigValue = diff --git a/Build/Version.hs b/Build/Version.hs index fb63666885..87315b0ea2 100644 --- a/Build/Version.hs +++ b/Build/Version.hs @@ -6,7 +6,6 @@ module Build.Version where import Data.List import System.Environment -import System.Directory hiding (isSymbolicLink) import Data.Char import System.Process import Control.Applicative @@ -14,6 +13,7 @@ import Prelude import Utility.Monad import Utility.Exception +import Utility.Directory type Version = String diff --git a/Common.hs b/Common.hs index 8cec490b18..5213863b9f 100644 --- a/Common.hs +++ b/Common.hs @@ -14,7 +14,6 @@ import Data.Monoid as X import Data.Default as X import System.FilePath as X -import System.Directory as X hiding (isSymbolicLink) import System.IO as X hiding (FilePath) #ifndef mingw32_HOST_OS import System.Posix.IO as X hiding (createPipe) diff --git a/Setup.hs b/Setup.hs index 26805bc131..0684674b3f 100644 --- a/Setup.hs +++ b/Setup.hs @@ -12,7 +12,7 @@ import Distribution.Verbosity (Verbosity) import System.FilePath import Control.Applicative import Control.Monad -import System.Directory hiding (isSymbolicLink) +import System.Directory import Data.List import Control.Exception diff --git a/Utility/Directory.hs b/Utility/Directory.hs index bc24828fb9..3b12b9fc06 100644 --- a/Utility/Directory.hs +++ b/Utility/Directory.hs @@ -6,9 +6,12 @@ -} {-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -fno-warn-tabs #-} +{-# OPTIONS_GHC -fno-warn-tabs -w #-} -module Utility.Directory where +module Utility.Directory ( + module Utility.Directory, + module System.Directory +) where import System.IO.Error import System.Directory hiding (isSymbolicLink) diff --git a/Utility/FreeDesktop.hs b/Utility/FreeDesktop.hs index 78c1035282..abaa313df1 100644 --- a/Utility/FreeDesktop.hs +++ b/Utility/FreeDesktop.hs @@ -33,9 +33,9 @@ import Utility.Path import Utility.UserInfo import Utility.Process import Utility.PartialPrelude +import Utility.Directory import System.Environment -import System.Directory hiding (isSymbolicLink) import System.FilePath import Data.List import Data.String.Utils diff --git a/Utility/LinuxMkLibs.hs b/Utility/LinuxMkLibs.hs index 016053303f..122f39643d 100644 --- a/Utility/LinuxMkLibs.hs +++ b/Utility/LinuxMkLibs.hs @@ -14,7 +14,6 @@ import Utility.Monad import Utility.Path import Data.Maybe -import System.Directory hiding (isSymbolicLink) import System.FilePath import Data.List.Utils import System.Posix.Files diff --git a/Utility/LockFile/PidLock.hs b/Utility/LockFile/PidLock.hs index 50c38d70cd..6a3e86a3f5 100644 --- a/Utility/LockFile/PidLock.hs +++ b/Utility/LockFile/PidLock.hs @@ -34,7 +34,6 @@ import Data.List import Network.BSD import System.FilePath import Data.Hash.MD5 -import System.Directory hiding (isSymbolicLink) import Control.Applicative import Prelude diff --git a/Utility/Path.hs b/Utility/Path.hs index 729300c435..3ee5ff39d3 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -12,7 +12,6 @@ module Utility.Path where import Data.String.Utils import System.FilePath -import System.Directory hiding (isSymbolicLink) import Data.List import Data.Maybe import Data.Char @@ -29,6 +28,7 @@ import Utility.Exception import qualified "MissingH" System.Path as MissingH import Utility.Monad import Utility.UserInfo +import Utility.Directory {- Simplifies a path, removing any "." component, collapsing "dir/..", - and removing the trailing path separator. diff --git a/Utility/Tmp.hs b/Utility/Tmp.hs index 11bab027dd..6a541cfe40 100644 --- a/Utility/Tmp.hs +++ b/Utility/Tmp.hs @@ -11,9 +11,9 @@ module Utility.Tmp where import System.IO -import System.Directory hiding (isSymbolicLink) import Control.Monad.IfElse import System.FilePath +import System.Directory import Control.Monad.IO.Class #ifndef mingw32_HOST_OS import System.Posix.Temp (mkdtemp)