Changes to ghc(9)

Changes to ghc:
commit 11d3f6b9868affa17f023c84f71e6f13642fcf91
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Sun Mar 23 18:44:43 2014 +0000

    Test Trac #8893

    (cherry picked from commit 7973bfb87fdbe6e980e64ed5d7b2a90a469effd4)

commit c63af7a0c599e9a090b38a7c3a51c56b8eea49ee
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Sat Mar 22 23:11:10 2014 +0000

    Apply the kind subst to the (kinds of the) quanitifed tyvars in deriveTyData

    I've elaboated Note [Unify kinds in deriving] to explain
    what is going on here.

    The change fixes Trac #8893.

    (cherry picked from commit ffed708c30f2d1d4b4c5cd08d9c19aeb0bb623ec)

commit 632956d089071969e52de65f27c810dd926e3a79
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Tue Mar 18 17:10:18 2014 +0000

    Make sure we occurrence-analyse unfoldings (fixes Trac #8892)

    For DFunUnfoldings we were failing to occurrence-analyse the unfolding,
    and that meant that a loop breaker wasn't marked as such, which in turn
    meant it was inlined away when it still had occurrence sites.  See
    Note [Occurrrence analysis of unfoldings] in CoreUnfold.

    This is a pretty long-standing bug, happily nailed by John Lato.

    (cherry picked from commit 87bbc69c40d36046492d754c8d7ff02c3be6ce43)

commit 85bc454267ba45091e560e62571a83409170646e
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Mon Mar 17 13:50:54 2014 +0000

    Test Trac #8889

    (cherry picked from commit 0e2155ddb10f4ccf53e50064756cbc3ce7dd8832)

commit 924f749433e171cc92d5d4b97701381d2ef75726
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Mar 14 22:51:20 2014 +0000

    Unflatten the constraints of an inferred types (Trac #8889)

    There was even a comment to warn about this possiblity,
    and it finally showed up in practice!  This patch fixes
    it quite nicely, with commens to explain.

    (cherry picked from commit 7a7af1ffc48f605cf365faf8fcef31ef4f13822b)

commit b95b3fbd402d53525948df03c82b774adfe7f13f
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Mar 7 17:15:15 2014 +0000

    Test Trac #8856

    (cherry picked from commit 062391be4f06aa408187582c4a40f1cea80429c3)

commit 935dc721cf02e3778615d3a40d04bdae17bfef0e
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Mar 7 16:50:17 2014 +0000

    Fix the treatment of lexically scoped kind variables (Trac #8856)

    The issue here is described in Note [Binding scoped type variables] in
    TcPat.  When implementing this fix I was able to make things quite a
    bit simpler:
     * The type variables in a type signature now never unify
       with each other, and so can be straightfoward skolems.
     * We only need the SigTv stuff for signatures in patterns,
       and for kind variables.

    (cherry picked from commit cf1a0f971966af633fbd932ad012ce716680465b)

commit 878dee3aad802c2d36c024ef4aa9fb1ae0895819
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Sun Mar 23 18:46:22 2014 +0000

    Trac #8831 is fixed

    (cherry picked from commit 1a7709ef9b25175566bc040a34b3d479ea8566ed)

    Conflicts:
    	testsuite/tests/ghci/scripts/all.T

commit 8ea3d18bea9021035f8cfb0693469f2db682638a
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Sat Mar 22 23:18:14 2014 +0000

    Simplify handling of the interactive package; fixes Trac #8831

    This patch is really a fix to the big commint
       73c08ab10e4077e18e459a1325996bff110360c3
       Re-work the naming story for the GHCi prompt (Trac #8649)
    which introduced the 'interactive' package
    See Note [The interactive package] in HscTypes

    The original commit set both
      (a) The tcg_mod field of TcGblEnv to 'interactive:Ghci4' (say)
      (b) The thisPackage field of DynFlags to 'interactive'

    But the second step interacts badly with linking.  :loaded modules are
    in the package set by 'thisPackage' (usually 'main'); if you change
    that, then we try to link package 'main', but can't find it, and
    that is what happened in #8831.

    The fix was simple: do (a) but not (b).

    I changed Note [The interactive package] in HscTypes to describe this.

    (cherry picked from commit 28e8d878b63d06824001ac3a631254679e0f1960)