[GHC] #7939: RHS of associated type not kind-checked

GHC ghc-devs at haskell.org
Thu Jun 20 01:18:42 CEST 2013


#7939: RHS of associated type not kind-checked
------------------------------------------+---------------------------------
  Reporter:  goldfire                     |          Owner:                  
      Type:  bug                          |         Status:  new             
  Priority:  normal                       |      Milestone:                  
 Component:  Compiler                     |        Version:  7.7             
Resolution:                               |       Keywords:                  
        Os:  Unknown/Multiple             |   Architecture:  Unknown/Multiple
   Failure:  GHC accepts invalid program  |     Difficulty:  Unknown         
  Testcase:  ghci/scripts/T7939           |      Blockedby:                  
  Blocking:                               |        Related:                  
------------------------------------------+---------------------------------

Comment(by monoidal):

 Aha - `type Bar a` in a typeclass declaration defaults to `type Bar a ::
 k`, while `type family Baz a` defaults to `type family Baz a :: *`. This
 is a slight inconsistency.

 Meanwhile, we can also write

 {{{
 {-# LANGUAGE TypeFamilies, PolyKinds #-}
 type family A :: k
 type instance A = Double
 type instance A = Maybe
 }}}

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



More information about the ghc-tickets mailing list