Changes to ghc(6) testsuite(3)

Changes to ghc:
commit ea49c01540c0f363048f6b04ba106d7893578574
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 09:58:42 2013 +0000

    Wibble to RnSplice (really belongs with b7f35733)

commit db53b5aae4818facba6b73f5b03a3e389c3ce5d5
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 09:41:02 2013 +0000

    Refactor TcSplice.tcBracket a bit

    The way that untyped brackets are typechecked is still grotesquely
    indirect, but I'll sort that out in a subsequent patch

commit e9999500694e2da81b43657cb86c48c8d20266fa
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 09:40:10 2013 +0000

    Clarify what is in ic_tythings, and refactor TcRnDriver.setInteractiveContext

    Previously there was a ton of cruft to do wtih "visible ids" in
    setInteractiveContext, but I made it all a lot simpler by providing
    a way to add to the typecheckers list of "global type variables",
    via TcEnv.tcExtendGlobalTyVars.  This is much nicer.

commit 7881488201629aa1ab36e3e0fbeb4d7b4b85bd91
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 09:24:54 2013 +0000

    A raft of changes driven by Trac #8540

    The root cause of #8450 is that the new Template Haskell story, with
    the renamer doing more of the work of Template Haskell, wasn't dealing
    correctly with the keepAlive problem.  Consider
        g = ..blah...
        f = [| g |]
    Then f's RHS refers to g's name but not to g, so g was being discarded
    as dead code.

    Fixing this sucked me into a deep swamp of understanding how all the moving
    parts of hte new Template Haskell fit together, leading to a large collection
    of related changes and better documentation.  Specifically:

    * Instead of putting the TH level of a binder in the LocalRdrEnv, there
      is now a separate field
          tcl_th_bndrs :: NameEnv (TopLevelFlag, ThLevel)
      in the TcLclEnv, which records for each binder
         a) whether it is syntactically a top-level binder or not
         b) its TH level
      This deals uniformly with top-level and non-top-level binders, which was
      previously dealt with via greviously-delicate meddling with Internal and
      External Names.  Much better.

    * As a result I could remove the tct_level field of ATcId.

    * There are consequential changes in TcEnv too, which must also extend the
      level bindings.  Again, more clarity.

      I renamed TcEnv.tcExtendTcTyThingEnv to tcExtendKindEnv2, since it's only used
      during kind inference, for (AThing kind) and APromotionErr; and that is
      relevant to whether we want to extend the tcl_th_bndrs field (no).

    * I de-crufted the code in RnEnv.extendGlobalRdrEnv, by getting rid of the
      qual_gre code which said "Seems like 5 times as much work as it deserves!".
      Instead, RdrName.pickGREs makes the Internal names shadow External ones.

    * I moved the checkThLocalName cross-stage test to finishHsVar; previously
      we weren't doing the test at all in the OpApp case!

    * Quite a few changes (shortening the code) in the cross-stage checking code
      in TcExpr and RnSplice, notably to move the keepAlive call to the renamer

    One leftover piece:

    * In TcEnv I removed tcExtendGhciEnv and refactored
      tcExtendGlobalTyVars; this is really related to the next commit, but
      it was too hard to disentangle.

commit 3e5905b429d64f29d7e19598ee3c475b4b162529
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 08:30:41 2013 +0000

    Refactor traceRunStatus/handleRunStatus

    No change in behaviour, but I combined these two functions, and I think
    the result is a good deal clearer

commit c42d5ca540c73e63aa658f2ce9065ce90542fbde
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 07:54:18 2013 +0000

    Improve pretty-printing of pending splices

Changes to testsuite:
commit 15c09a332cd24e5d6c4c9a0ede9b151c9a095f66
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 16:42:43 2013 +0000

    Higher residency in Haddock

    I think there really is a slight worsening in the situation here, but
    it needs someone to build a profiled compiler and take a proper look.
    There isn't anything obvious in what I've done, which mainly concerns
    Template Haskell and hence should not affect Haddock.

    Strange, annoying, but I'm going to live with it.

commit 7766065f6538bc74c011ca876fe50e281052e511
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 16:41:10 2013 +0000

    Error message wibbles

commit 9fa51f9fcbd17dda6e8d5ca8b91f0cdfaeddb209
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Nov 22 16:40:36 2013 +0000

    Error message improvements