summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T11520.hs
blob: 801a9254c45852360c768c0345e78e275261216b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE RankNTypes, PolyKinds, GADTs, UndecidableSuperClasses, UndecidableInstances #-}
{-# LANGUAGE StandaloneKindSignatures #-}

module T11520 where

import Data.Kind (Type, Constraint)
import GHC.Types hiding (TyCon)

type TypeRep :: k -> Type
data TypeRep a

type Typeable :: k -> Constraint
class Typeable k => Typeable (a :: k) where
    typeRep :: TypeRep a

data Compose (f :: k1 -> *) (g :: k2 -> k1) (a :: k2) = Compose (f (g a))

-- Note how the kind signature on g is incorrect
instance (Typeable f, Typeable (g :: k), Typeable k) => Typeable (Compose f g) where
    typeRep = undefined