Make T8832 operative on 32-bit systems (#8832)

(Also, the 'extra_clean' was unnecessary.)
ghci/scripts/ghci016: Add implementation for negate

Summary: This previously produced a warning

Test Plan: validate

Reviewers: austin

Reviewed By: austin

Subscribers: simonmar, relrod, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D162
concurrent/should_run/throwto002: DoRec -> RecursiveDo

Summary: Test case used old extension name; update it.

Test Plan: validate

Reviewers: austin

Reviewed By: austin

Subscribers: simonmar, relrod, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D161
Fix three problems with occurrence analysis on case alternatives.

Summary:
  1. Respect condition (a) in Note [Binder swap]
  2. Respect condition (b) in Note [Binder swap]
  3. Return usage of any coercion variables in binder swap

Fixes T9440

Test Plan: See #9440

Reviewers: simonpj, austin

Reviewed By: simonpj, austin

Subscribers: simonpj, simonmar, relrod, ezyang, carter

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

GHC Trac Issues: #9440
testsuite/T9379: Use GHC.Conc instead of Control.Concurrent.STM

Summary:
`GHC.Conc` provides almost everything we need.

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>

Test Plan:
    make test TEST=T9379

Reviewers: austin, simonmar

Reviewed By: austin, simonmar

Subscribers: phaskell, simonmar, relrod, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D152
Make Prelude.abs handle -0.0 correctly (#7858)

Summary:
Make the `Float` and `Double` implementations of `abs` handle -0.0
correctly per IEEE-754.

abs (-0.0::Float) and abs (-0.0::Double) previously returned -0.0, when
they should return 0.0. This patch fixes this.

Signed-off-by: Alexander Berntsen <alexander@plaimi.net>

Test Plan: abs (-0.0::Double) should = 0.0 instead of (-0.0)

Reviewers: ekmett, hvr, austin, rwbarton

Reviewed By: austin, rwbarton

Subscribers: phaskell, trofi, simonmar, relrod, ezyang, carter

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

GHC Trac Issues: #7858
Make Prelude.signum handle -0.0 correctly (#7858)

Summary:
Make the `Float` and `Double` implementations of `signum` handle -0.0
correctly per IEEE-754.

This, together with "Make Prelude.abs handle -0.0 correctly (#7858)",
fixes Trac #7858.

Depends on D145

Signed-off-by: Alexander Berntsen <alexander@plaimi.net>

Test Plan:
signum of (-0.0) should be (-0.0) not 0.0.

Test program:

  main =
    putStrLn $ p ++ " " ++ n
    where
      f = show . signum
      p = f (-0.0 :: Double)
    n = f (0.0 :: Double)

Reviewers: ekmett, hvr, rwbarton, austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, ezyang, carter

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

GHC Trac Issues: #7858
Bug #9439: Ensure that stage 0 compiler isn't affected

Summary:
Bug #9439 will cause miscompilation of GHC's LLVM backend. Here we
ensure that an affected compiler isn't used to bootstrap.

Test Plan: Attempt to bootstrap GHC with an affected stage 0 compiler.

Reviewers: rwbarton, austin

Reviewed By: austin

Subscribers: simonmar, relrod, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D159
UNREG: fix PackageKey emission into .hc files

Summary:
Fixes ./configure --unable-unregisterised build failure:
    HC [stage 1] (one of the first calls)
    ...
    <command line>: unknown package: transformers-0.4.1.0

The reason of bug is how UNREG build stores package information
in .hc files:
    compiler/main/CodeOutput.lhs generates first line as
        /* GHC_PACKAGES pkg-name-ver1 pkg-name-ver2 ...
    while DriverPipeline.hs (getHCFilePackages) expects
        /* GHC_PACKAGES pkg-key1 pkg-key2 ...

Fix it by emitting ghc's PackageKey in CodeOutput

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

Test Plan: build-tested on ./configure --enable-unregistersied

Reviewers: simonmar, ezyang, austin

Reviewed By: ezyang, austin

Subscribers: simonmar, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D164
Implement -rdynamic in Linux and Windows/MinGW32.

Summary:
In Linux, it is a synonym for -optl -rdynamic.
In Windows, it is a synonym for -optl -export-all-symbols.

Test Plan: validate

Reviewers: simonmar, austin

Reviewed By: simonmar, austin

Subscribers: mboes, phaskell, simonmar, relrod, ezyang, carter

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

GHC Trac Issues: #9381
Have the RTS linker search symbols in the originating windows binary.

Summary: In initLinker, this patch adds the handle of the module corresponding to the program binary to the list of DLL handles that lookupSymbol uses to search for symbols.

Test Plan: validate

Reviewers: simonmar, austin

Reviewed By: simonmar, austin

Subscribers: phaskell, simonmar, relrod, ezyang, carter

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

GHC Trac Issues: #9382
This note's name has been fixed
includes/stg/Prim.h: add matching 'hs_atomic_*' prototypes

Fixes implicit function declarations in C codegen.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
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>