Make cabal01 pass with Cabal 1.18 (#8738).

Signed-off-by: Austin Seipp <austin@well-typed.com>
Comments only -- clarifying Notes around compatibility.
Remove redundant compatibility check.

Previously, the closed type family compatibility check was
done even when type-checking an interface file. But interface
files now store compatibility info, so this check was redundant.
Add test case for #8917
Fix #8917.

FamInstEnv.normaliseTcApp should normalise arguments even when
the top-level tycon isn't a type family. This was a regression
from 7.6 -- not sure when it happened, but it was probably my
fault. Fixed now, in any case.
sync-all: Skip END actions on exceptions

Before this change, the END actions were executed even if the code
throws an exception using "die".  This resulted in very confusing
error reporting when an invalid command line option was specified.

Signed-off-by: Austin Seipp <austin@well-typed.com>
add --with-ar and --with-ranlib configure parameters

Both --with-ar and --with-ranlib are usable on non-GNU/Linux systems
where GNU tools are usually installed (or possible to install), but
not into standard location nor with standard name. Tested on Solaris 10.

Signed-off-by: Austin Seipp <austin@well-typed.com>
Add a simplistic Vagrantfile with bootstrapping

This adds a simple Vagrantfile to the root directory, which you can use
to easily spin up RHEL/Debian/Ubuntu virtual machine in seconds to test
GHC.

For example, from the root of the GHC tree, you can say:

    $ vagrant up ubuntu1204-amd64
    $ vagrant ssh ubuntu1204-amd64

This will give you access to a provisioned Ubuntu 12.04 virtual machine
with all the necessary GHC dependencies installed (modulo a few things).

Debian 7/CentOS 6.5/Ubuntu 12.04 only for now, in amd64/i386
configurations. In the future I plan to at least add FreeBSD and NixOS
boxes where possible.

Improvements are necessary of course. By default a box is given 4GB of
RAM and 2 cores, and resolves DNS entries by routing through the host
DNS configuration. Do not run 'vagrant up' unless you have lots of RAM
as it will spawn *every* virtual machine.

Hopefully, this should make it far easier for contributors to get
started eventually.

Signed-off-by: Austin Seipp <austin@well-typed.com>
change deriveConstants to use nm in a POSIX way (fixes #8781)

The patch provided by Christian Maeder <Christian.Maeder@dfki.de>

Signed-off-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
Convert haddock into a proper submodule (re #8545)

This should help contribute content to

  https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
ghc-cabal: force use of UTF8 when writing out `haddock-prologue.txt`

This unbreaks the GHC build if a non-UTF8 locale such as LANG=C is active

See also haskell/cabal#1721 and haskell/haddock#286

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Apply the kind subst to the (kinds of the) quanitifed tyvars in deriveTyData

I've elaboated Note [Unify kinds in deriving] to explain
what is going on here.

The change fixes Trac #8893.
Simplify handling of the interactive package; fixes Trac #8831

This patch is really a fix to the big commint
   73c08ab10e4077e18e459a1325996bff110360c3
   Re-work the naming story for the GHCi prompt (Trac #8649)
which introduced the 'interactive' package
See Note [The interactive package] in HscTypes

The original commit set both
  (a) The tcg_mod field of TcGblEnv to 'interactive:Ghci4' (say)
  (b) The thisPackage field of DynFlags to 'interactive'

But the second step interacts badly with linking.  :loaded modules are
in the package set by 'thisPackage' (usually 'main'); if you change
that, then we try to link package 'main', but can't find it, and
that is what happened in #8831.

The fix was simple: do (a) but not (b).

I changed Note [The interactive package] in HscTypes to describe this.
Test Trac #8893
Trac #8831 is fixed
Fix typo
Catch a bunch of typos in comments
The substitution is never needed, so don't prepare it
Revert "Fix #8745 - GND is now -XSafe compatible."

See #8827 - for now, we're making GND unsafe again.

This also fixes the tests since they were originally not using the new
unicode quote style we're using.

This reverts commit a8a01e742434df11b830ab99af12d9045dfcbc4b.
Revert "change deriveConstants to use nm in a POSIX way (fixes #8781)"

It causes a failure on Windows right now.

This reverts commit 045b28033a33a48d31951240a8cb35f2b78345dc.