GeneralizedNewtypeDeriving and PolyKinds
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.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |