diff options
Diffstat (limited to 'testsuite/tests/polykinds/T15170.hs')
-rw-r--r-- | testsuite/tests/polykinds/T15170.hs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T15170.hs b/testsuite/tests/polykinds/T15170.hs new file mode 100644 index 0000000000..02de90ae12 --- /dev/null +++ b/testsuite/tests/polykinds/T15170.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE DataKinds, PolyKinds #-} +{-# LANGUAGE TypeOperators #-} +module T15170 where + +import Data.Kind +import Data.Proxy + +data TyFun :: Type -> Type -> Type +type a ~> b = TyFun a b -> Type +infixr 0 ~> + +type family Apply (f :: k1 ~> k2) (x :: k1) :: k2 +type f @@ x = Apply f x +infixl 9 @@ + +wat :: forall (a :: Type) + (b :: a ~> Type) + (c :: forall (x :: a). Proxy x ~> b @@ x ~> Type) + (f :: forall (x :: a) (y :: b @@ x). Proxy x ~> Proxy y ~> c @@ ('Proxy :: Proxy x) @@ y) + (x :: a). + (forall (xx :: a) (yy :: b @@ xx). Proxy (f @@ ('Proxy :: Proxy xx) @@ ('Proxy :: Proxy yy))) + -> () +wat _ = () |