[GHC] #7524: Erroneous repeated kind variable in conflicting type family instance error message

GHC cvs-ghc at haskell.org
Mon Jan 28 22:01:23 CET 2013


#7524: Erroneous repeated kind variable in conflicting type family instance error
message
----------------------------------------------+-----------------------------
Reporter:  goldfire                           |          Owner:                  
    Type:  bug                                |         Status:  new             
Priority:  normal                             |      Component:  Compiler        
 Version:  7.7                                |       Keywords:                  
      Os:  Unknown/Multiple                   |   Architecture:  Unknown/Multiple
 Failure:  Incorrect warning at compile-time  |      Blockedby:                  
Blocking:                                     |        Related:  #7587           
----------------------------------------------+-----------------------------

Comment(by simonpj@…):

 commit a98e51ecf51d1a93d48a8a10d35827edfd9d8c28
 {{{
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Mon Jan 28 08:18:28 2013 +0000

     More refactoring of FamInst/FamInstEnv; finally fixes Trac #7524

     Quite a bit of tidying up here; the fix to #7524 is actually
     only a small part.

     * Be fully clear that the cab_tvs in a CoAxBranch are not
       fresh.  See Note [CoAxBranch type variables] in CoAxiom.

     * Use CoAxBranch to replace the ATDfeault type in Class.
       CoAxBranch is perfect here.  This change allowed me to
       delete quite a bit of boilerplate code, including the
       corresponding IfaceSynType.

     * Tidy up the construction of CoAxBranches, and when FamIntBranch is
       freshened.  The latter onw happens only in FamInst.newFamInst.

     * Tidy the tyvars of a CoAxBranch when we build them, done in
       FamInst.mkCoAxBranch.  See Note [Tidy axioms when we build them]
       in that module.  This is what fixes #7524.

     Much niceer now.

  compiler/iface/BinIface.hs                        |    7 -
  compiler/iface/IfaceSyn.lhs                       |   31 ++---
  compiler/iface/MkIface.lhs                        |   21 +--
  compiler/iface/TcIface.lhs                        |   29 ++---
  compiler/typecheck/FamInst.lhs                    |  142
 ++++++++++++++-------
  compiler/typecheck/TcGenGenerics.lhs              |    9 +-
  compiler/typecheck/TcInstDcls.lhs                 |   50 +++-----
  compiler/typecheck/TcRnDriver.lhs                 |    4 +-
  compiler/typecheck/TcTyClsDecls.lhs               |   21 ++--
  compiler/types/Class.lhs                          |   20 +---
  compiler/types/CoAxiom.lhs                        |   31 ++++-
  compiler/types/Coercion.lhs                       |    1 -
  compiler/types/FamInstEnv.lhs                     |  106 +---------------
  compiler/vectorise/Vectorise/Generic/PAMethods.hs |    4 +-
  compiler/vectorise/Vectorise/Generic/PData.hs     |   10 +-
  15 files changed, 204 insertions(+), 282 deletions(-)
 }}}

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



More information about the ghc-tickets mailing list