[GHC] #7020: Kind variable generalization problem
GHC
cvs-ghc at haskell.org
Thu Jun 21 19:22:51 CEST 2012
#7020: Kind variable generalization problem
---------------------------------------+------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.5 | Keywords: PolyKinds
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC rejects valid program | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------------+------------------------------------
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7020>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list