Make ghc-cabal's `System.Directory` import more robust
authorHerbert Valerio Riedel <hvr@gnu.org>
Sat, 31 Oct 2015 15:13:50 +0000 (16:13 +0100)
committerHerbert Valerio Riedel <hvr@gnu.org>
Sat, 31 Oct 2015 15:44:41 +0000 (16:44 +0100)
Starting with directory-1.2.5 there will be a nameclash with
`withCurrentDirectory` and `MIN_VERSION_filepath()` isn't available at
bootstrap-time with the current GHC build-system.

By using explicit import lists we avoid CPP altogether

utils/ghc-cabal/Main.hs

index 6e3e10c..6da7733 100644 (file)
@@ -29,7 +29,7 @@ import qualified Data.ByteString.Lazy.Char8 as BS
 import Data.List
 import Data.Maybe
 import System.IO
-import System.Directory
+import System.Directory (setCurrentDirectory, getCurrentDirectory, doesFileExist)
 import System.Environment
 import System.Exit      (exitWith, ExitCode(..))
 import System.FilePath