Add a summary section.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Definite compilation is a go

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Write up rename on entry

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Ignore tix files.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Duplicate word
X86 codegen: make LOCK a real instruction prefix

Before LOCK was a separate instruction and this led to the register
allocator separating it from the instruction it was supposed to be a
prefix of, leading to illegal assembly such as

    lock mov

Fix contributed by PÁLI Gábor János.
Fix test for fetchNandIntArray#

The test was incorrectly testing that NAND is associative, which it
isn't.
Add missing memory fence to atomicWriteIntArray#
Fixed issue with detection of duplicate record fields

Duplicate record fields would not be detected when given a type
with multiple data constructors, and the first data constructor
had a record field r1 and any consecutive data constructors
had multiple fields named r1.

This fixes #9156 and was reviewed in https://phabricator.haskell.org/D87
Use the right kinds on the LHS in 'deriving' clauses

This patch fixes Trac #9359
Check for boxed tau types in the LHS of type family instances

Fixes Trac #9357
[backpack] Rewrite compilation to be cleaner.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Refactor FFI error messages

This patch was provoked by Trac #5610, which I finally got a moment to look at.

In the end I added a new data type ErrUtils.Validity,

  data Validity
    = IsValid            -- Everything is fine
    | NotValid MsgDoc    -- A problem, and some indication of why

with some suitable combinators, and used it where appropriate (which touches
quite a few modules).  The main payoff is that error messages improve for
FFI type validation.
Update test suite output

after changes in 92587bf.

This problem was noticed on ghcspeed (although only by accident,
unfortunately, as a change from 0 to 1 is not reported in the summary).
Module reexports, fixing #8407.

The general approach is to add a new field to the package database,
reexported-modules, which considered by the module finder as possible
module declarations.  Unlike declaring stub module files, multiple
reexports of the same physical package at the same name do not
result in an ambiguous import.

Has submodule updates for Cabal and haddock.

NB: When a reexport renames a module, that renaming is *not* accessible
from inside the package.  This is not so much a deliberate design choice
as for implementation expediency (reexport resolution happens only when
a package is in the package database.)

TODO: Error handling when there are duplicate reexports/etc is not very
well tested.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

Conflicts:
	compiler/main/HscTypes.lhs
	testsuite/.gitignore
	utils/haddock
Fix build on OS X due to macro-like string in comment

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Implement OVERLAPPING and OVERLAPPABLE pragmas (see #9242)

This also removes the short-lived NO_OVERLAP pragama, and renames
OVERLAP to OVERLAPS.

An instance may be annotated with one of 4 pragams, to control its
interaction with other overlapping instances:

  * OVERLAPPABLE:
    this instance is ignored if a more specific candidate exists

  * OVERLAPPING:
    this instance is preferred over more general candidates

  * OVERLAPS:
    both OVERLAPPING and OVERLAPPABLE (i.e., the previous GHC behavior).
    When compiling with -XOverlappingInstances, all instance are OVERLAPS.

  * INCOHERENT:
    same as before (see manual for details).
    When compiling with -XIncoherentInstances, all instances are INCOHERENT.
Comments only
Increase precision of timings reported by RTS

Summary:
Today's hardware is much faster, so it makes sense to report timings
with more precision, and possibly help reduce rounding-induced
fluctuations in the nofib statistics.

This commit increases the precision of all timings previously reported
with a granularity of 10ms to 1ms. For instance, the `+RTS -S` output is
now rendered as:

    Alloc    Copied     Live     GC     GC      TOT      TOT  Page Flts
    bytes     bytes     bytes   user   elap     user     elap
   641936     59944    158120  0.000  0.000    0.013    0.001    0    0  (Gen:  0)
   517672     60840    158464  0.000  0.000    0.013    0.002    0    0  (Gen:  0)
   517256     58800    156424  0.005  0.005    0.019    0.007    0    0  (Gen:  1)
   670208      9520    158728  0.000  0.000    0.019    0.008    0    0  (Gen:  0)

  ...

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0        24 colls,     0 par    0.002s   0.002s     0.0001s    0.0002s
  Gen  1         3 colls,     0 par    0.011s   0.011s     0.0038s    0.0055s

  TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1)

  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

  INIT    time    0.001s  (  0.001s elapsed)
  MUT     time    0.005s  (  0.006s elapsed)
  GC      time    0.014s  (  0.014s elapsed)
  EXIT    time    0.001s  (  0.001s elapsed)
  Total   time    0.032s  (  0.020s elapsed)

Note that this change also requires associated changes in the nofib
submodule.

Test Plan: tested with modified nofib

Reviewers: simonmar, nomeata, austin

Subscribers: simonmar, relrod, carter

Differential Revision: https://phabricator.haskell.org/D97
Support ghc-pkg --ipid to query package ID.

Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

Test Plan: validate

Reviewers: hvr, simonmar, austin

Subscribers: simonmar, relrod, carter

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