[GHC] #5820: defining instance in GHCi leads to duplicated instances

GHC cvs-ghc at haskell.org
Fri Feb 10 16:34:29 CET 2012


#5820: defining instance in GHCi leads to duplicated instances
---------------------------------+------------------------------------------
    Reporter:  guest             |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  high              |   Milestone:  7.4.2           
   Component:  GHCi              |     Version:  7.4.1-rc1       
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj@…):

 commit cc047084f6842f10a0767e976bde6c93582b53e7
 {{{
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Fri Feb 10 10:46:16 2012 +0000

     Put only local instances in the interactive context (fixes Trac #5820)

     In HscMain.hscDeclsWithLocaion, we were grabbing class instances from
     the tcg_inst_env field of the TcGblEnv. But that's wrong: that field
     contains all the *home-package* instances.  Instead we need the
     tct_insts field, which has just the instances from the module being
     compiled.

  compiler/main/HscMain.hs |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 }}}

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



More information about the Glasgow-haskell-bugs mailing list