Improve Haddock markup

This fixes the markup at the top of `Control.Arrow`, and improves the
markup inside DEPRECATED strings.

(Haddock supports markup inside DEPRECATED messages, which allows to
turn references to Haskell entities into hyperlinks by using the usual
Haddock markup.)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Derive `FiniteBits` for integral newtype wrappers

When `FiniteBits` was introduced in cddc9024e67a6d4c01bb190839d0134af8c907e0
only the standard Haskell 2010 finite-size integral types were given a
`FiniteBits` instance, however, since also a DEPRECATION warning was put
in place (as per 701d9ed4b2bec5922709a91bfb625881d7dd47f0) for `bitSize`
which might point people to to `FiniteBits`, it seems sensible to derive
`FiniteBits` for all integral newtype wrappers as well.

N.B.: This makes `Integer` the only type in `base` with a `Bits`
      instance but no `FiniteBits` instance.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Fix iOS build (fallout from 28b031c506)

As Luke Iannini reported, the Clang iOS cross compiler apparently
doesn't support __thread for some bizarre reason, so unfortunately they
too must fall back to pthread_{get,set}specific.

Signed-off-by: Austin Seipp <austin@well-typed.com>
Add a perf-cross build setting.

This is for building performance-optimized cross compilers (e.g. the iOS
target.)

Signed-off-by: Austin Seipp <austin@well-typed.com>
Bump win32 version number in release notes

Signed-off-by: Austin Seipp <austin@well-typed.com>
Comment typo
Remove Coercible documentation from compiler/prelude/primops.txt.pp

We want it to show up in GHC.Exts, so we need to put the documentation
in GHC.Types, where the datatype Coercible is defined.
Show docs for coerce and Coercible in GHC.Exts

as that is the canonical place for people to import them from.
Document Coercible in GHC.Types

It is not exported from here, but haddock still uses this documentation
(and not the one from the fake GHC/Prim.hs file). So just put the user
documentation here.
Fix some edge cases in 8f8bd88c (#7134)

Signed-off-by: Austin Seipp <austin@well-typed.com>
Improve documentation of `integer-gmp`

Among other things, this unhides `GHC.Integer` and re-groups the export list.
Moreover, the internal representation of `Integer` is explained a bit more,
and `/Since: 0.5.1.0/` annotations have been added.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Update to latest Cabal 1.18 branch tip

This update pulls in the fix for #8266

(recommended add-on reading for those interested in OSX linker peculiarities:
https://github.com/haskell/cabal/issues/1660#issuecomment-33701508 )

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
No need to remove testsuite/.git

as there is no testsuite/.git any more.
Individual sdist-foo targets

so that one can build a source distribution without downloading the
windows tarballs.
Add Hackage-supported `changelog.md`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Remove some references to deprecated -fglasgow-exts in user's guide
Loopification jump between stack and heap checks

Fixes #8585

When emmiting label of a self-recursive tail call (ie. when
performing loopification optimization) we emit the loop header
label after a stack check but before the heap check. The reason is
that tail-recursive functions use constant amount of stack space
so we don't need to repeat the check in every loop. But they can
grow the heap so heap check must be repeated in every call.
See Note [Self-recursive tail calls] and [Self-recursive loop header].
Remove unnecessary LANGUAGE pragma
Simplify Control Flow Optimisations Cmm pass

It turns out that one of the cases in the optimization pass was
a special case of another. I remove that specialization since it
does not have impact on compilation time, and the resulting Cmm
is identical.
Nuke dead code

  * CmmRewriteAddignments module was replaced by CmmSink a long
    time ago. That module is now available at
    https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Hoopl/Examples
    wiki page.

  * removeDeadAssignments function was not used and it was also
    moved to the above page.

  * I also nuked some commented out debugging code that was not
    used for 1,5 year.