Remove the type-checking knot.
[ghc.git] / testsuite / tests / polykinds / T9200.hs
1 {-# LANGUAGE PolyKinds, MultiParamTypeClasses, FlexibleContexts, DataKinds,
2 TypeFamilies #-}
3
4 module T9200 where
5 import Data.Proxy
6
7 ------
8 -- test CUSK on classes
9
10 class C (f :: k) (a :: k2) where
11 c_meth :: D a => Proxy f -> Proxy a -> ()
12
13 class C () a => D a
14
15
16 ---------
17 --- test CUSK on type synonyms
18 data T1 a b c = MkT1 (S True b c)
19 data T2 p q r = MkT2 (S p 5 r)
20 data T3 x y q = MkT3 (S x y '())
21 type S (f :: k1) (g :: k2) (h :: k3) = ((T1 f g h, T2 f g h, T3 f g h) :: *)
22
23
24 ----------
25 -- test CUSK on closed type families
26 type family F (a :: k) :: k where
27 F True = False
28 F False = True
29 F x = x
30