Fix a TyVar bug in the flattener
[ghc.git] / testsuite / tests / polykinds / T14450.hs
1 {-# Language KindSignatures, TypeOperators, PolyKinds, TypeOperators, ConstraintKinds, TypeFamilies, DataKinds, TypeInType, GADTs, AllowAmbiguousTypes, InstanceSigs #-}
2
3 module T14450 where
4
5 import Data.Kind
6
7 data TyFun :: Type -> Type -> Type
8
9 type a ~> b = TyFun a b -> Type
10
11 type Cat ob = ob -> ob -> Type
12
13 type SameKind (a :: k) (b :: k) = (() :: Constraint)
14
15 type family Apply (f :: a ~> b) (x :: a) :: b where
16 Apply IddSym0 x = Idd x
17
18 class Varpi (f :: i ~> j) where
19 type Dom (f :: i ~> j) :: Cat i
20 type Cod (f :: i ~> j) :: Cat j
21
22 varpa :: Dom f a a' -> Cod f (Apply f a) (Apply f a')
23
24 type family Idd (a::k) :: k where
25 Idd (a::k) = a
26
27 data IddSym0 :: k ~> k where
28 IddSym0KindInference :: IddSym0 l
29
30 instance Varpi (IddSym0 :: k ~> k) where
31 type Dom (IddSym0 :: Type ~> Type) = (->)