[GHC] #5938: Kind variables not allowed in type family instance declarations

GHC cvs-ghc at haskell.org
Tue Mar 13 19:27:12 CET 2012


#5938: Kind variables not allowed in type family instance declarations
---------------------------------------+------------------------------------
 Reporter:  goldfire                   |          Owner:                         
     Type:  bug                        |         Status:  new                    
 Priority:  normal                     |      Component:  Compiler (Type checker)
  Version:  7.5                        |       Keywords:                         
       Os:  Unknown/Multiple           |   Architecture:  Unknown/Multiple       
  Failure:  GHC rejects valid program  |       Testcase:                         
Blockedby:                             |       Blocking:                         
  Related:                             |  
---------------------------------------+------------------------------------
 I am trying to create a kind-indexed type family, but I cannot use kind
 variables in my kind annotations:

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

 type family KindFam a
 type instance KindFam (a :: *) = Int
 type instance KindFam (a :: Bool) = Bool
 type instance KindFam (a :: Maybe k) = Char -- doesn't work
 }}}

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



More information about the Glasgow-haskell-bugs mailing list