Flush after TH in #8884 test case

(I recall that this was needed in some cases in the past, and might fix
the validate error on travis.)
Typos

Signed-off-by: Austin Seipp <austin@well-typed.com>
testsuite: add test for #8831

Signed-off-by: Austin Seipp <austin@well-typed.com>
linker: Fix indirect calls for x86_64 windows (#2283)

Signed-off-by: Austin Seipp <austin@well-typed.com>
Update ghc --help references to --make and a.out (fixes #8600)

Signed-off-by: Austin Seipp <austin@well-typed.com>
codeGen: inline allocation optimization for clone array primops

The inline allocation version is 69% faster than the out-of-line
version, when cloning an array of 16 unit elements on a 64-bit
machine.

Comparing the new and the old primop implementations isn't
straightforward. The old version had a missing heap check that I
discovered during the development of the new version. Comparing the
old and the new version would requiring fixing the old version, which
in turn means reimplementing the equivalent of MAYBE_CG in StgCmmPrim.

The inline allocation threshold is configurable via
-fmax-inline-alloc-size which gives the maximum array size, in bytes,
to allocate inline. The size does not include the closure header size.

Allowing the same primop to be either inline or out-of-line has some
implication for how we lay out heap checks. We always place a heap
check around out-of-line primops, as they may allocate outside of our
knowledge. However, for the inline primops we only allow allocation
via the standard means (i.e. virtHp). Since the clone primops might be
either inline or out-of-line the heap check layout code now consults
shouldInlinePrimOp to know whether a primop will be inlined.
Mark test for #8831 as known-broken

to keep validate working.
Follow hs_popcntX changes in ghc-prim
Enable popcnt test now when segfault is fixed

The fix was to ghc-prim.
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>