Remove the type-checking knot.
[ghc.git] / testsuite / tests / polykinds / T9574.hs
1 {-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, ScopedTypeVariables, GADTs, RankNTypes #-}
2 module T9574 where
3
4 data KProxy (t :: *) = KProxy
5 data Proxy p
6
7 class Funct f where
8 type Codomain f :: *
9
10 instance Funct ('KProxy :: KProxy o) where
11 type Codomain 'KProxy = NatTr (Proxy :: o -> *)
12
13 data NatTr (c :: o -> *) where
14 M :: (forall (a :: o). Proxy a) -> NatTr (c :: o -> *)
15
16 p :: forall (c :: o -> *). NatTr c
17 p = M t where
18 M t = undefined :: Codomain ('KProxy :: KProxy o)