Kind variable generalization problem
Consider the following tangle of definitions:
{-# LANGUAGE KindSignatures, RankNTypes, PolyKinds, GADTs,
FlexibleContexts, DataKinds, TypeFamilies #-}
import GHC.Exts
data family Sing (a :: k)
class SingKind (Any :: k) => SingI (s :: k) where
sing :: Sing s
data SingInstance :: k -> * where
SingInstance :: SingI a => SingInstance a
class (b ~ Any) => SingKind (b :: k) where
singInstance :: forall (a :: k). Sing a -> SingInstance a
When compiling (with 7.5.20120620), I get this error message:
Kind mis-match
The first argument of `SingKind' should have kind `k1',
but `Any' has kind `k'
In the class declaration for `SingI'
I believe that the code should compile, though I'll admit I'm not 100% convinced.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.5 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |