#7269: GeneralizedNewtypeDeriving and PolyKinds
------------------------------+---------------------------------------------
 Reporter:  dreixel           |          Owner:  dreixel         
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.6.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 The following code

 {{{
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}

 class C (a :: k)

 instance C Int

 newtype MyInt = MyInt Int deriving C
 }}}

 fails with this error:
 {{{
     Cannot derive well-kinded instance of form `C k (MyInt ...)'
       Class `C' expects an argument of kind `k'
     In the newtype declaration for `MyInt'
 }}}

 I believe this should work, and I think I know what's going on. I'm
 working on it.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7269>
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