Embrace -XTypeInType, add -XStarIsType
[ghc.git] / testsuite / tests / polykinds / T15170.hs
1 {-# LANGUAGE AllowAmbiguousTypes #-}
2 {-# LANGUAGE RankNTypes #-}
3 {-# LANGUAGE TypeFamilies #-}
4 {-# LANGUAGE DataKinds, PolyKinds #-}
5 {-# LANGUAGE TypeOperators #-}
6 module T15170 where
7
8 import Data.Kind
9 import Data.Proxy
10
11 data TyFun :: Type -> Type -> Type
12 type a ~> b = TyFun a b -> Type
13 infixr 0 ~>
14
15 type family Apply (f :: k1 ~> k2) (x :: k1) :: k2
16 type f @@ x = Apply f x
17 infixl 9 @@
18
19 wat :: forall (a :: Type)
20 (b :: a ~> Type)
21 (c :: forall (x :: a). Proxy x ~> b @@ x ~> Type)
22 (f :: forall (x :: a) (y :: b @@ x). Proxy x ~> Proxy y ~> c @@ ('Proxy :: Proxy x) @@ y)
23 (x :: a).
24 (forall (xx :: a) (yy :: b @@ xx). Proxy (f @@ ('Proxy :: Proxy xx) @@ ('Proxy :: Proxy yy)))
25 -> ()
26 wat _ = ()