Changes to ghc(5)

Changes to ghc:
commit 7fa6c67bcc9970ce2fa4b3f3a7f17042b9b4fd0e
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu Mar 6 12:13:17 2014 +0000

    Trac #8569 fixed

commit bf9bf602399eca30ca522ae5bae52d4f3ec1ab88
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu Mar 6 12:13:05 2014 +0000

    Test for Trac #8841 now works

commit 96daafc3305a691590b88c1175a8f45e5d327471
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu Mar 6 11:32:55 2014 +0000

    Attach the right location to pattern synonym error message (fixes Trac #8841)

commit 4b355cd21a190e3d2c2d3a830ba2337d1c442dfe
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu Mar 6 11:31:47 2014 +0000

    Make the demand on a binder compatible with type (fixes Trac #8569)

    Because of GADTs and casts we were getting binders whose
    demand annotation was more deeply nested than made sense
    for its type.

    See Note [Trimming a demand to a type], in Demand.lhs,
    which I reproduce here:

       Note [Trimming a demand to a type]
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       Consider this:

         f :: a -> Bool
         f x = case ... of
                 A g1 -> case (x |> g1) of (p,q) -> ...
                 B    -> error "urk"

       where A,B are the constructors of a GADT.  We'll get a U(U,U) demand
       on x from the A branch, but that's a stupid demand for x itself, which
       has type 'a'. Indeed we get ASSERTs going off (notably in
       splitUseProdDmd, Trac #8569).

       Bottom line: we really don't want to have a binder whose demand is more
       deeply-nested than its type.  There are various ways to tackle this.
       When processing (x |> g1), we could "trim" the incoming demand U(U,U)
       to match x's type.  But I'm currently doing so just at the moment when
       we pin a demand on a binder, in DmdAnal.findBndrDmd.

commit eeb1400a0ca9ba7d1831f8ec0b221f632dec9f68
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu Mar 6 10:50:32 2014 +0000

    Add some debug tracing