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

module T11520 where

import GHC.Types hiding (TyCon)

data TypeRep (a :: k)

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