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