#7282: polykinds error: Found `k' but expected `k'
---------------------------------------+------------------------------------
 Reporter:  HolgerReinhardt            |          Owner:                        
 
     Type:  bug                        |         Status:  new                   
 
 Priority:  normal                     |      Component:  Compiler (Type 
checker)
  Version:  7.6.1                      |       Keywords:                        
 
       Os:  Unknown/Multiple           |   Architecture:  Unknown/Multiple      
 
  Failure:  GHC rejects valid program  |       Testcase:                        
 
Blockedby:                             |       Blocking:                        
 
  Related:                             |  
---------------------------------------+------------------------------------
 {{{
 {-# OPTIONS -XTypeFamilies -XDataKinds -XPolyKinds #-}

 class Foo (xs :: [k]) where
     type Bar xs :: *

 instance Foo '[] where
     type Bar '[] = Int
 }}}
 fails with:

 {{{
 I:\a.hs:7:5:
     Type indexes must match class instance head
     Found `k' but expected `k'
     In the type instance declaration for `Bar'
     In the instance declaration for `Foo '[]'
 }}}

 If I change the kind of xs from [k] to [*], the program is accepted.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to