#5417: GHCi browse gets type families wrong
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  Compiler          |      Version:  7.2.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by simonpj):

 This patch makes `:browse` consistent
 {{{
 commit cd3d6f884ee7f2e425359e910a0effc5a27c71db
 Author: Simon Peyton Jones <[email protected]>
 Date:   Mon Aug 22 07:57:50 2011 +0100

     In :browse, always print output in the *current* context

     Previously :browse M (without !) printed output relative to
     a context that was neither the current one, nor the top-level
     context of M, but rather that established
     by
          import Prelude
          import M
     This was pretty confusing, so Simon and I agreed to use
     a simple, uniform rule: output in GHC is always relative
     to the current context.

 >---------------------------------------------------------------

  docs/users_guide/ghci.xml |   54
 +++++++++++++++++++++++++-------------------
  ghc/InteractiveUI.hs      |   30 +++++++++---------------
  2 files changed, 42 insertions(+), 42 deletions(-)
 }}}
 These two fix the way that `:browse` displays declarations, esp ones
 involving associated types
 {{{
 commit 9c889adc05ce9f16b20abb35db417e52e615e249
 Author: Simon Peyton Jones <[email protected]>
 Date:   Mon Aug 22 07:59:52 2011 +0100

     Pretty-printing improvements in HsSyn

 >---------------------------------------------------------------

  compiler/hsSyn/HsBinds.lhs |   30 ++++++++++++++++--------------
  compiler/hsSyn/HsDecls.lhs |   34 +++++++++++++++++++---------------
  2 files changed, 35 insertions(+), 29 deletions(-)

 commit d50a0937b4b5b0fd2f3882e15c4ddd7110d4ab45
 Author: Simon Peyton Jones <[email protected]>
 Date:   Mon Aug 22 08:03:44 2011 +0100

     Make pprTyThingInContenxt handle associated types right

     Just as we want to display a data constructor as part of its
     parent data type declaration, so with associated types.  This
     was simply missing before.

  compiler/main/GHC.hs        |    2 +-
  compiler/main/HscTypes.lhs  |   23 ++++++++-
  compiler/main/PprTyThing.hs |  113
 ++++++++++++++++++++++--------------------
  compiler/types/TyCon.lhs    |   11 +++--
  4 files changed, 88 insertions(+), 61 deletions(-)
 }}}
 And this one fixes some other glitches in the interaction of instance
 declarations with associated types
 {{{
 commit f76f0d0e5ec81244951994be1d1acee5650b0b75
 Author: Simon Peyton Jones <[email protected]>
 Date:   Mon Aug 22 08:08:50 2011 +0100

     A batch of changes related to the handling of binders in instance
 decls

     The issue is that in
         instnace C T where
           data S = ...
           f = ...
     neither S nor f is really a binder; they are *occurrences*.  Moreover
     Haskell dictates that these particular occurrences are disambiguated
     by looking at the class whose instance they occur in.

     Some of this was not handled right for associated types.  And
     RnNames.getLocalNonValBinders was a bit messhy; this patch tidies it
     up.

     (And thenM is finally gone from RnSource.)

  compiler/basicTypes/RdrName.lhs   |   14 +--
  compiler/deSugar/DsMeta.hs        |    2 +-
  compiler/hsSyn/HsTypes.lhs        |   16 ++--
  compiler/rename/RnBinds.lhs       |    2 +-
  compiler/rename/RnEnv.lhs         |   27 +++--
  compiler/rename/RnNames.lhs       |  208
 ++++++++++++++++++++-----------------
  compiler/rename/RnSource.lhs      |  205
 ++++++++++++++++--------------------
  compiler/typecheck/TcRnDriver.lhs |    7 +-
  8 files changed, 241 insertions(+), 240 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5417#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to