Helped extra-ghci-libraries find its way to .cabal files.
Switch InstallPlan over to using IPID-indexed PackageIndex.

While this doesn't let us get rid of Distribution.Client.PackageIndex,
it does make InstallPlan more flexible, so we can have the same
package name-package version in the install plan multiple times.
We do this by synthesizing fake installed package IDs to act
as placeholders prior to compilation.

There is some shindig with 'FakeMap' in PackageIndex, check out
the Note in that file for more details.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Bash completion for "cabal sandbox" subcommands

Command "cabal sandbox --list-options" doesn't list subcommands of
"cabal sandbox", but "cabal help sandbox" does. It turns out that it is
easy to parse its output using sed and as such can be added to list of
words for completion.
Generate object files for older versions of GHC

This works around GHC bug #8942, for the versions of GHC which are
affected by this bug.
Merge pull request #2054 from ezyang/ezyang-reuse-index-dev

Switch InstallPlan over to using IPID-indexed PackageIndex
Merge pull request #2119 from gelisam/generate-object-files

Generate object files for older versions of GHC
Merge pull request #2104 from trskop/master

Bash completion for "cabal sandbox" subcommands
Fix three bugs with fake-map implementation for PackageIndex.

1. When we union PackageIndexes together, prefer the later one.
   This idiom is used when we update the processing-state of
   packages in an InstallPlan.

2. dependencyInconsistencies' was missing a number of indirections
   through the fakeMap, so in some cases we incorrectly concluded
   packages were not equal when they were.

3. We need to initialize the fakeMap with any pre-installed packages,
   otherwise the invariant check for configured-packages will fail.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Revert "Fix three bugs with fake-map implementation for PackageIndex."

This reverts commit f59bab102de3663c957b735a8d963d19f0fbde2e.

Revert "Switch InstallPlan over to using IPID-indexed PackageIndex."

This reverts commit 6465d174cbec5cef676b57a409d8f8f310a2b04e.
System.Win32.DLL import seems redunant
Merge pull request #2126 from Heather/master

System.Win32.DLL import seems redunant
clean redunant imports in cabal-install\Distribution\Client: Environment.hs, Time.hs
Data.Bits: bitSize -> finiteBitSize
'Setup.hs sdist': invoke 'tar' with '--format ustar' if possible.

Fixes #1901. Some variants of 'tar' don't support the '--format' option, so we
have to do feature detection.

Note that 'cabal sdist' (as opposed to 'Setup.hs sdist') uses the built-in
tar.gz archiver ('Distribution.Client.Tar') and doesn't invoke 'tar' or 'gzip'.
Merge pull request #1903 from 23Skidoo/issue-1901

'Setup.hs sdist': invoke 'tar' with '--format ustar' if possible.
Append instead of prepending.

"-czf" must go first.
remove #if MIN_VERSION_base(4,5,0)
guard finiteBitSize with MIN_VERSION_base(4,7,0)
Merge pull request #2128 from Heather/bitSize

Data.Bits: bitSize -> finiteBitSize
Use 'dropWhileEnd' and 'takeWhileEnd'.

'[drop,take]WhileEnd p' is semantically the same as 'reverse . [drop,take]While
p . reverse', but more efficient and easier to read.