Comment fix
Explicit import lists for StgCmmProf.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Remove the final vestiges of InlineWrappers

Part of Nick Frisby's patch (c080f727ba5f83921b842fcff71e9066adbdc250)
for late demand-analysis removed the over-zealous short-cut whereby
strictness wrappers were not spelled out in detail in interface files.

This patch completes the process by
 * removing InlineWrapper from UnfoldingSource
 * removing IfWrapper from IfaceUnfolding

There was a tiny bit of special ad-hocery for wrappers, in OccurAnal,
but fortunately that too turns out to be rendered irrelevant by
the more uniform treatment, and after that there was no need
to remember which functions are wrappers.
Make Specialise close over kind variables (fixes Trac #8196)

This is a lingering bug from the introduction of polymorphic kinds.
In the specialiser we were specialising over a type, but failing
to specialise over the kinds it mentions.

The fix is simple: add a call to closeOverKinds.

Most of the patch is to add closeOverKinds, and to use it in a few
other places where we are doing essentially the same thing.
Improve documentation for the 7.8 release

* Document ExplicitNamespaces
* Improve documentation of ambiguity, and AllowAmbiguousTypes
* Improve documentation of overlapping/incoherent instance rules
* List language extensions in alphabetical order
Comments only
Extend `packages` by 4th column for upstream repo

By keeping the repository url in the `packages` file scripts such as
source:ghc/sync-all can pick it up. Moreover, it's easier to
automatically validate for correctness than the
wiki:Repositories/Upstream page.
Patch by lukexi.

Fixing #8217 for the unix(-like) case.
Improve Linting in GHCi (fixes Trac #8215)

The original problem was that we weren't bringing varaibles bound in the
interactive context into scope before Linting the result of a top-level
declaration in GHCi.  (We were doing this for expressions.)

Moreover I found that we weren't Linting the result of desugaring
a GHCi expression, which we really should be doing.

It took me a bit of time to unravel all this, and I did some refactoring
to make it easier next time.

  * CoreMonad contains the Lint wrappers that get the right
    environments into place.  It always had endPass and lintPassResult
    (which Lints bindings), but now it has lintInteractiveExpr.

  * Both use a common function CoreMonad.interactiveInScope to find
    those in-scope variables.

Quite a bit of knock-on effects from this, but nothing exciting.
Comment only
Comments and type synonym in CmmSink
Fix #7918
Allow non-Nominal covars (bugfix)
Make validate play nice with clang (for Xcode 5 command line tools)

* This partially fixes #8148. However, --with-ghc-4.8 will still not work given the rather dubious m4 macros and the failures in the test suite due to '-nodefaultlibs' still need to be fixed.
Hack-fix build breakage on Linux/GCC from fc4856f9

For some reason, the new `GccIsClang` variable introduced via
fc4856f9e811d9a23ae9212f43a09ddf5ef12b26 for addressing #8148
isn't set explicitly to `NO`; so this simply changes the test
`ifeq $(GccIsClang) NO` to `ifneq $(GccIsClang) YES` which
should fix the build with and w/o Clang.
Don't move Capabilities in setNumCapabilities (#8209)

We have various problems with reallocating the array of Capabilities,
due to threads in waitForReturnCapability that are already holding a
pointer to a Capability.

Rather than add more locking to make this safer, I decided it would be
easier to ensure that we never move the Capabilities at all.  The
capabilities array is now an array of pointers to Capabaility.  There
are extra indirections, but it rarely matters - we don't often access
Capabilities via the array, normally we already have a pointer to
one.  I ran the parallel benchmarks and didn't see any difference.
Fix printf formats for pathchar on Windows (where it's wchar_t, not char)
Don't refer to oc->next after freeing oc.
Fix over-eager unpacking in isUnpackableType

This bug meant that we tried to unpack Link in

  data Link a = MkLink !(Link a)

when -funbox-small-strict-fields was on.  See Trac #8221.
Improve debug tracing a bit