error if the config file is invalid

This stops surprising the developer when their config file is ignored due to a typo.
switched from error to die
Change the inplace package database to not use file-style database.

Instead we use HcPkg.init (e.g. ghc-pkg init). For ghc-pkg this will
create a new directory style db.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Signed-off-by: Duncan Coutts <duncan@well-typed.com>
Fix ABI hash construction to exclude trailing newline
Change rep of module re-exports, and do resolution ourselves

The initial support for module re-exports relied on ghc-pkg to resolve
user-specified re-exports to references to specific installed packages.
This resolution is something that can fail so it's better for Cabal to
do it during the package configure phase.

In addition, it is inconvenient in ghc-pkg to be doing this resolution,
and it just seems fishy as a design. Also, the same ModuleExport type
was being used both for user-specified source re-exports and also for
the specific re-exports in the package db.

This patch splits the type into two: one for source level, and one for
resolved ones for use in the package db. The configure phase resolves
one to the other.

One minor change: it is now possible to re-export a module defined in
the same package that is not itself exported (ie it's in other-modules,
rather than exposed-modules). Previously for modules definied in the
same package they had to be themselves exported. Of course for
re-exports from other packages they have to be exposed.
Merge pull request #2061 from dcoutts/master

Change rep of module re-exports, and do module re-export resolution ourselves in Cabal
Merge pull request #2042 from maxpow4h/patch-1

error if the config file is invalid
Fix some identifiers which weren't renamed.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Add a comment to buildDepends saying not to use it.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Fixed links and anchors in Cabal user guide.
Merge pull request #2074 from rudymatela/master

Fixed links and anchors in Cabal user guide.
Merge pull request #2073 from ezyang/ezyang-build-depends-comment

Add a comment to buildDepends saying not to use it.
Merge branch 'master' of git://git.haskell.org/packages/Cabal

Edward's patch to stop using old file style package dbs.
Don't bail if cabal sandbox delete fails.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Support module thinning and renaming Cabal-side.

NB: unlike GHC, Cabal will still try to find a globally consistent choice for
all package names, i.e. this does *not* implement private dependencies.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>