Extend runRnSpliceHook to decls and patterns
Document Proxy# (#8658)

Signed-off-by: Austin Seipp <austin@well-typed.com>
Further refine the test for 'given' equalities

Trac #8651 revealed that my previous fix (itself in response to #8644)
wasn't quite right.  The plan, using the CtOrigin to identify
constraints arising from flattening, is described in TcSimplify,
Note [When does an implication have given equalities?]
Comment typo
Improve documentation of :module etc (Trac #8622)

I did quite a bit of restructuring, as well as adding
the note specifically referred to in #8622
A little refactoring so that we print package-qualified modules names if necessary
Further improve the "same-occurrence" error messages (Trac #8278)

Sometimes we actually have a good SrcSpan for the type constructor
and reporting that is better than just reporting which module it
was defined on
Re-work the naming story for the GHCi prompt (Trac #8649)

The basic idea here is simple, and described in Note [The interactive package]
in HscTypes, which starts thus:

    Note [The interactive package]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Type and class declarations at the command prompt are treated as if
    they were defined in modules
       interactive:Ghci1
       interactive:Ghci2
       ...etc...
    with each bunch of declarations using a new module, all sharing a
    common package 'interactive' (see Module.interactivePackageId, and
    PrelNames.mkInteractiveModule).

    This scheme deals well with shadowing.  For example:

       ghci> data T = A
       ghci> data T = B
       ghci> :i A
       data Ghci1.T = A  -- Defined at <interactive>:2:10

    Here we must display info about constructor A, but its type T has been
    shadowed by the second declaration.  But it has a respectable
    qualified name (Ghci1.T), and its source location says where it was
    defined.

    So the main invariant continues to hold, that in any session an original
    name M.T only refers to oe unique thing.  (In a previous iteration both
    the T's above were called :Interactive.T, albeit with different uniques,
    which gave rise to all sorts of trouble.)

This scheme deals nicely with the original problem.  It allows us to
eliminate a couple of grotseque hacks
  - Note [Outputable Orig RdrName] in HscTypes
  - Note [interactive name cache] in IfaceEnv
(both these comments have gone, because the hacks they describe are no
longer necessary). I was also able to simplify Outputable.QueryQualifyName,
so that it takes a Module/OccName as args rather than a Name.

However, matters are never simple, and this change took me an
unreasonably long time to get right.  There are some details in
Note [The interactive package] in HscTypes.
Comments only
Fix a typo in comment
Notes and code cosmetics

Explain why defaultDmd resTypeArgDmd are similar, but both needed, and
apply slight code cosmetics.
Bring kind variables into the type-checker's scope as well as type variables

Fixes Trac #8616
Make showSDoc and friends respect -dppr-cols

Previously they just used a fixed width of 100, ignoring
-dppr-cols.  I think this dates back to a time when
the flag didn't exist, or wasn't conveniently available.

Thanks to Andrew Gibiansky for pointing this out.
Make initGhcMonad call setUnsafeGlobalDynFlags

If we don't do this, then in various GHC API scenarios
(which use runGhc) with tracing/debugging/ASSERTs on,
we try to read those unsafe global dynamic flags and
find them uninitialised.
Comment typos only
Document the fact that Areas overlap, and why.
Clarify issue in #8630 in users' guide.

We do *not* propagate kind information from an instance declaration's
members back into the instance head.
Fix #8599.

This change is just some documentation around ignoring the context
of an enclosing instance when processing `deriving` clauses of an
associated data instance.
Update mailmap

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Fix typo in error message

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>