Changes to ghc(6)

Changes to ghc:
commit 9e10d1883d7ea5ea422cda79b426f51d2b59b14d
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Jan 3 16:04:04 2014 +0000

    Improve the equality-floating story (again), to fix Trac #8644

    We float equalities out of implications whose 'givens' include equalities.
    But it's a bit tricky knowing whether some givens do or do not include
    equalities, as #8644 shows.  There the given has type 'c' (which might
    have equalities), but we discover that 'c ~ ()', which definitely doesn't.

    In short, we must look at the givens *after* normalisation, not before.
    Moreover, something similar happens in approximateWC, where we need
    to ask whether an implication has given equalities.

    This patch does the job:

    * Add a Boolean field inert_no_eqs to InertCans, which records
      whether we've added a non-constant equality

    * Add a field ic_no_eqs to Implication, which records whether the
      ic_given binders include any equalities

    * Get rid of Inst.hasEqualities altogether

    On the way I did some un-forced refactoring

    * Introduce the auxiliary function TcCanonical.flattenNestedFamApp

    * Kill off FamHeadMap and PredMap in favour of
      the new FunEqMap and DictMap respectively

commit 5dffb4ac14b53362ebe9a67c5c6a01f9c9c25229
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Jan 3 15:50:39 2014 +0000

    Refactor the way shadowing in handled in GHCi

    If you say
      ghci> import Foo( T )
      ghci> data T = MkT
      ghci> data T = XXX
    then the second 'data T' should shadow the first.  But the qualified
    Foo.T should still be available.  We really weren't handling this
    correctly at all, resulting in Trac #8639 and #8628 among others

    This patch:

    * Add RdrName.extendGlobalRdrEnv, which does shadowing properly

    * Change HscTypes.icExtendGblRdrEnv (was badly-named icPlusGblRdrEnv)
      to use the new function

    * Change RnNames.extendGobalRdrEnvRn to use the new function

    * Move gresFrom Avails into RdrName
    * Better pprGlobalRdrEnv function in RdrName

commit e60a841b07d000703e7aceb0faec908ce8f3257f
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Jan 3 15:39:35 2014 +0000

    Improve error message when using qualified names in GHCi

    When you say
      ghci> :i Foo.x
    GHCi tries to find module Foo and get 'x' from it.  But
    if Foo doesn't exist we don't want to say:
      Attempting to use module ‛Foo’ which is not loaded

    This is a bit confusing. Rather we just want to say that
    Foo.x is not in scope.

commit 5c4265f25f04f191fafc4a7f6bfde088385da53e
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Jan 3 15:36:31 2014 +0000

    Add alterOccEnv

commit 4853be24dd382f8fafa97077143c67da00b90d6e
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Jan 3 15:35:45 2014 +0000

    Use the GlobalRdrEnv when renaming the axuiliary bindings in 'deriving'

    I'm not sure why were were using bindLocalNames before, but it triggers
    an assert failure that checks that local names are Internal.  This
    change makes things more uniform and straightforward.

commit c93d664baa552e43c915e995663aa624bcfcd6ff
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Thu Jan 2 15:16:32 2014 +0000

    In ':show imports' take account of -XNoImplicitPrelude

    Fixes Trac #8640