Use absolute links to Cabal docs from the GHC users guide (#9154)

Signed-off-by: Austin Seipp <austin@well-typed.com>
Explain how to clone GitHub forks. Ticket #8379.

This information is mirrored at:
http://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources#GettingaGHCrepositoryfromGitHub

Signed-off-by: Austin Seipp <austin@well-typed.com>
Mention that `Data.Ix` uses row-major indexing

This addresses Trac #8712 by simply mentioning row-major indexing,
thereby removing any ambiguity.

Signed-off-by: Austin Seipp <austin@well-typed.com>
build: require GHC 7.6 for bootstrapping

Summary:
Per the usual standards, a build of GHC is only compileable
by the last two releases (e.g. 7.8 only by 7.4 and 7.6). To make sure
we don't get suckered into supporting older compilers, let's remove
this support now.

Signed-off-by: Austin Seipp <austin@well-typed.com>

Test Plan:
Try to bootstrap with GHC 7.4, watch it fail. Bootstrap
with 7.6 or better, and everything works.

Reviewers: hvr

Reviewed By: hvr

Subscribers: simonmar, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D167
Add test case for #9046

Signed-off-by: Austin Seipp <austin@well-typed.com>
Correct checkStrictBinds for generalised type

See Trac #9140.

Auditors: simonpj

Signed-off-by: Austin Seipp <austin@well-typed.com>
Check if file is present instead of directory

Fixes #8886.

Problem: any `sync-all` command that is run before the first succesfull
`sync-all get` would trigger a false warning about an old `time` package
being present.

Cause: after cloning the ghc repository, the (empty) `libraries/time`
directory is already present.

Solution: check if the directory actually contains any of the `time`
files. I picked the `LICENSE` file, since `boot` does so as well.

Signed-off-by: Austin Seipp <austin@well-typed.com>
travis: Use hvr’s multi-ghc-PPA
rts/base: Fix #9423

Summary:
Fix #9423.

The problem in #9423 is caused when code invoked by `hs_exit()` waits
on all foreign calls to return, but some IO managers are in `safe` foreign
calls and do not return. The previous design signaled to the timer manager
(via its control pipe) that it should "die" and when the timer manager
returned to Haskell-land, the Haskell code in timer manager then signalled
to the IO manager threads that they should return from foreign calls and
`die`. Unfortunately, in the shutdown sequence the timer manager is unable
to return to Haskell-land fast enough and so the code that signals to the
IO manager threads (via their control pipes) is never executed and the IO
manager threads remain out in the foreign calls.

This patch solves this problem by having the RTS signal to all the IO
manager threads (via their control pipes; and in addition to signalling
to the timer manager thread) that they should shutdown (in `ioManagerDie()`
in `rts/Signals.c`. To do this, we arrange for each IO manager thread to
register its control pipe with the RTS (in `GHC.Thread.startIOManagerThread`).
In addition, `GHC.Thread.startTimerManagerThread` registers its control pipe.
These are registered via C functions `setTimerManagerControlFd` (in
`rts/Signals.c`) and `setIOManagerControlFd` (in `rts/Capability.c`). The IO
manager control pipe file descriptors are stored in a new field of the
`Capability_ struct`.

Test Plan: See the notes on #9423 to recreate the problem and to verify that it no longer occurs with the fix.

Auditors: simonmar

Reviewers: simonmar, edsko, ezyang, austin

Reviewed By: austin

Subscribers: phaskell, simonmar, ezyang, carter, relrod

Differential Revision: https://phabricator.haskell.org/D129

GHC Trac Issues: #9423, #9284
validate: add simple CPU count autodetection

Summary: Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Test Plan: ran ./validate on linux

Reviewers: austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D146
Fix prepositions in the documentation of -rdynamic.
Make sure that a prototype is included for 'setIOManagerControlFd'
Comments fix to Trac #9140
coreSyn: detabify/dewhitespace TrieMap

Signed-off-by: Austin Seipp <austin@well-typed.com>
stranal: detabify/dewhitespace WorkWrap

Signed-off-by: Austin Seipp <austin@well-typed.com>
simplCore: detabify/dewhitespace SAT

Signed-off-by: Austin Seipp <austin@well-typed.com>
utils: detabify/dewhitespace BufWrite

Signed-off-by: Austin Seipp <austin@well-typed.com>
utils: detabify/dewhitespace GraphBase

Signed-off-by: Austin Seipp <austin@well-typed.com>
utils: detabify/dewhitespace GraphPpr

Signed-off-by: Austin Seipp <austin@well-typed.com>
simplCore: detabify/dewhitespace SetLevels

Signed-off-by: Austin Seipp <austin@well-typed.com>