[GHC] #7073: Kind variable problem when declaring associated type family

GHC cvs-ghc at haskell.org
Fri Jul 13 16:54:06 CEST 2012


#7073: Kind variable problem when declaring associated type family
------------------------------+---------------------------------------------
 Reporter:  goldfire          |          Owner:                         
     Type:  bug               |         Status:  new                    
 Priority:  normal            |      Component:  Compiler (Type checker)
  Version:  7.5               |       Keywords:  PolyKinds TypeFamilies 
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple       
  Failure:  None/Unknown      |       Testcase:                         
Blockedby:                    |       Blocking:                         
  Related:                    |  
------------------------------+---------------------------------------------
 The following code fails to compile:

 {{{
 {-# LANGUAGE PolyKinds, TypeFamilies #-}

 class Foo a where
   type Bar a
   type Bar a = Int
 }}}

 The error I get is

 {{{
     Type indexes must match class instance head
     Found `k' but expected `k'
     In the type synonym instance default declaration for `Bar'
     In the class declaration for `Foo'
 }}}

 When I remove {{{-XPolyKinds}}}, the code compiles without a hiccup.

 This was tested on 7.5.2012.0710

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



More information about the Glasgow-haskell-bugs mailing list