Embrace -XTypeInType, add -XStarIsType
[ghc.git] / testsuite / tests / dependent / should_compile / T11719.hs
1 {-# LANGUAGE RankNTypes, TypeFamilies, TypeOperators, DataKinds, PolyKinds,
2 UndecidableInstances #-}
3
4 module T11719 where
5
6 import Data.Kind
7
8 data TyFun :: Type -> Type -> Type
9 type a ~> b = TyFun a b -> Type
10
11 type family (f :: a ~> b) @@ (x :: a) :: b
12
13 data Null a = Nullable a | NotNullable a
14
15 type family ((f :: b ~> c)(g :: a ~> b)) (x :: a) :: c where
16 (f ∘ g) x = f @@ (g @@ x)
17
18 type family BaseType (k :: forall a. a ~> Type) (x :: b) :: Type where -- this fails :(