Define TyCoRep.ppSuggestExplicitKinds, and use it
[ghc.git] / testsuite / tests / typecheck / should_fail / ContextStack2.hs
1 {-# LANGUAGE AllowAmbiguousTypes, TypeFamilies #-}
2
3 module ContextStack2 where
4
5 type family TF a :: *
6 type instance TF (a,b) = (TF a, TF b)
7
8 t :: (a ~ TF (a,Int)) => Int
9 t = undefined
10
11 {- a ~ TF (a,Int)
12 ~ (TF a, TF Int)
13 ~ (TF (TF (a,Int)), TF Int)
14 ~ (TF (TF a, TF Int), TF Int)
15 ~ ((TF (TF a), TF (TF Int)), TF Int)
16
17
18 fsk ~ a
19 TF (a, Int) ~ fsk
20 -->
21 fsk ~ a
22 * fsk ~ (TF a, TF Int)
23 (flatten lhs)
24 a ~ (TF a, TF Int)
25 (flatten rhs)
26 a ~ (fsk1, TF Int)
27 (wk) TF a ~ fsk1
28
29 --> (rewrite inert)
30
31 fsk ~ (fsk1, TF Int)
32 a ~ (fsk1, TF Int)
33 (wk) TF a ~ fsk1
34
35 -->
36 fsk ~ (fsk1, TF Int)
37 a ~ (fsk1, TF Int)
38
39 * TF (fsk1, fsk2) ~ fsk1
40 (wk) TF Tnt ~ fsk2
41
42 -->
43 fsk ~ (fsk1, TF Int)
44 a ~ (fsk1, TF Int)
45
46 * fsk1 ~ (TF fsk1, TF fsk2)
47 (flatten rhs)
48 fsk1 ~ (fsk3, TF fsk2)
49
50
51 (wk) TF Int ~ fsk2
52 TF fsk1 ~ fsk3
53 -}