Commit 58cd8e9c authored by Francesco Gazzetta's avatar Francesco Gazzetta

merged imports

not all imports can be merged because some are inside ifdefs, but all
the safe one are now merged
parent ea05e051
......@@ -33,11 +33,10 @@ import Foreign
( allocaBytes )
#ifndef mingw32_HOST_OS
import System.Posix.Internals (withFilePath)
import System.Posix.Types
( FileMode )
import System.Posix.Internals
( c_chmod )
( c_chmod, withFilePath )
import Foreign.C
( throwErrnoPathIfMinus1_ )
#endif /* mingw32_HOST_OS */
......
......@@ -56,8 +56,9 @@ import Distribution.Compiler
import Distribution.Text
import System.Directory (getAppUserDataDirectory)
import System.FilePath ((</>), isPathSeparator, pathSeparator)
import System.FilePath (dropDrive)
import System.FilePath
( (</>), isPathSeparator
, pathSeparator, dropDrive )
#ifdef mingw32_HOST_OS
import qualified Prelude
......
......@@ -203,7 +203,7 @@ import qualified Data.ByteString.Lazy.Char8 as BS.Char8
import System.Directory
( Permissions(executable), getDirectoryContents, getPermissions
, doesDirectoryExist, doesFileExist, removeFile, findExecutable
, getModificationTime )
, getModificationTime, createDirectory, removeDirectoryRecursive )
import System.Environment
( getProgName )
import System.Exit
......@@ -213,8 +213,6 @@ import System.FilePath
, getSearchPath, joinPath, takeDirectory, splitFileName
, splitExtension, splitExtensions, splitDirectories
, searchPathSeparator )
import System.Directory
( createDirectory, removeDirectoryRecursive )
import System.IO
( Handle, hSetBinaryMode, hGetContents, stderr, stdout, hPutStr, hFlush
, hClose, hSetBuffering, BufferMode(..) )
......
......@@ -81,13 +81,11 @@ import qualified Data.Set as Set
import qualified Data.ByteString as SBS
import System.Directory
( removeFile )
( removeFile, renameFile )
import System.FilePath
( (<.>), splitFileName )
import System.Directory
( renameFile )
import System.IO
( openFile, openBinaryFile, withFile, withBinaryFile
( openBinaryFile, withFile, withBinaryFile
, openBinaryTempFileWithDefaultPermissions
, IOMode(ReadMode), hGetContents, hClose )
import qualified Control.Exception as Exception
......
......@@ -35,7 +35,7 @@ import Distribution.Client.Setup
import Distribution.Simple.Setup
( HaddockFlags, fromFlagOrDefault )
import Distribution.Simple.Utils
( die', notice )
( die', notice, wrapText )
import Distribution.Verbosity
( normal )
......@@ -46,8 +46,6 @@ import Control.Monad (unless)
import Distribution.Simple.Command
( CommandUI(..), usageAlternatives )
import Distribution.Simple.Utils
( wrapText )
import qualified Distribution.Client.Setup as Client
......
......@@ -12,9 +12,8 @@ import System.Posix.Types
import System.Posix.Internals
( c_chmod )
import Foreign.C
( withCString )
import Foreign.C
( throwErrnoPathIfMinus1_ )
( withCString
, throwErrnoPathIfMinus1_ )
#else
import System.Win32.File (setFileAttributes, fILE_ATTRIBUTE_HIDDEN)
#endif /* mingw32_HOST_OS */
......
......@@ -100,7 +100,7 @@ import Distribution.Verbosity
import Distribution.Solver.Types.ConstraintSource
import Data.List
( partition, find, foldl' )
( partition, find, foldl', nubBy )
import Data.Maybe
( fromMaybe )
import Control.Monad
......@@ -135,8 +135,6 @@ import Data.Char
import qualified Data.Map as M
import Data.Function
( on )
import Data.List
( nubBy )
import GHC.Generics ( Generic )
--
......
......@@ -38,7 +38,6 @@ import Distribution.Client.SetupWrapper
( setupWrapper, SetupScriptOptions(..), defaultSetupScriptOptions )
import Distribution.Client.Targets
( userToPackageConstraint, userConstraintPackageName )
import Distribution.Package (PackageId)
import Distribution.Client.JobControl (Lock)
import qualified Distribution.Solver.Types.ComponentDeps as CD
......@@ -58,13 +57,11 @@ import Distribution.Simple.Program (ProgramDb)
import Distribution.Client.SavedFlags ( readCommandFlags, writeCommandFlags )
import Distribution.Simple.Setup
( ConfigFlags(..), AllowNewer(..), AllowOlder(..), RelaxDeps(..)
, fromFlag, toFlag, flagToMaybe, fromFlagOrDefault )
, fromFlag, toFlag, flagToMaybe, fromFlagOrDefault, isRelaxDeps )
import Distribution.Simple.PackageIndex
( InstalledPackageIndex, lookupPackageName )
import Distribution.Simple.Utils
( defaultPackageDesc )
import Distribution.Package
( Package(..), packageName )
( Package(..), packageName, PackageId )
import Distribution.Types.Dependency
( Dependency(..), thisPackageVersion )
import qualified Distribution.PackageDescription as PkgDesc
......@@ -81,9 +78,8 @@ import Distribution.Version
( Version, mkVersion, anyVersion, thisVersion
, VersionRange, orLaterVersion )
import Distribution.Simple.Utils as Utils
( warn, notice, debug, die' )
import Distribution.Simple.Setup
( isRelaxDeps )
( warn, notice, debug, die'
, defaultPackageDesc )
import Distribution.System
( Platform )
import Distribution.Text ( display )
......
......@@ -51,9 +51,9 @@ import Distribution.Text
import qualified System.FilePath.Posix as FilePath.Posix
( splitDirectories )
import System.FilePath
( (<.>) )
( (<.>), takeFileName, takeDirectory )
import System.Directory
( doesFileExist, renameFile )
( doesFileExist, renameFile, canonicalizePath )
import System.IO
( withFile, IOMode(ReadMode), hGetContents, hClose )
import System.IO.Error
......@@ -69,8 +69,6 @@ import Distribution.Simple.Program.Db
import Distribution.Simple.Program.Run
( IOEncoding(..), getEffectiveEnvironment )
import Numeric (showHex)
import System.Directory (canonicalizePath)
import System.FilePath (takeFileName, takeDirectory)
import System.Random (randomRIO)
import System.Exit (ExitCode(..))
......
......@@ -27,7 +27,7 @@ import Distribution.Simple.Program.Db
import Distribution.Simple.Program
import Distribution.System (OS(Windows,Linux,OSX), buildOS)
import Distribution.Simple.Utils
( withFileContents )
( withFileContents, tryFindPackageDesc )
import Distribution.Simple.Configure
( getPersistBuildConfig )
import Distribution.Version
......@@ -37,7 +37,6 @@ import Distribution.Types.LocalBuildInfo
import Distribution.PackageDescription
import Distribution.PackageDescription.Parse
import Distribution.Simple.Utils (tryFindPackageDesc)
import Distribution.Compat.Stack
import Text.Regex.TDFA
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment