testsuite: Bump a performance tests
[ghc.git] / testsuite / tests / perf / compiler / T5837.hs
1 {-# LANGUAGE AllowAmbiguousTypes, TypeFamilies #-}
2
3 module T5837 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 {-
12
13 [G] a ~ TF (a,Int) -- a = a_am1
14 -->
15 [G] TF (a,Int) ~ fsk -- fsk = fsk_am8
16
17 inert [G] fsk ~ a
18
19 ---> reduce
20 [G] fsk ~ (TF a, TF Int)
21
22 inert [G] fsk ~ a
23
24 ---> substitute for fsk and flatten
25 [G] TF a ~ fsk1
26 [G] TF Int ~ fsk2
27
28 inert [G] fsk ~ a
29 [G] a ~ (fsk1, fsk2)
30
31 ---> (substitute for a in first constraint)
32 TF (fsk1, fsk2) ~ fsk1 (C1)
33 TF Int ~ fsk2
34
35 inert a ~ (fsk2, TF Int)
36 inert fsk ~ (fsk2, TF Int)
37
38
39 ------- At this point we are stuck because of
40 -- the recursion in the first constraint C1
41 -- Hooray
42
43 -- Before, we reduced C1, which led to a loop
44
45 ---> (top-level reduction, re-orient)
46 fsk2 ~ (TF fsk2, TF Int)
47 inert a ~ (fsk2, TF Int)
48 inert fsk ~ (fsk2, TF Int)
49
50 ---> (attempt to flatten (TF fsk2) to get rid of fsk2
51 TF fsk2 ~ fsk3
52 fsk2 ~ (fsk3, TF Int)
53 inert a ~ (fsk2, TF Int)
54 inert fsk ~ (fsk2, TF Int)
55
56 --->
57 TF fsk2 ~ fsk3
58 inert fsk2 ~ (fsk3, TF Int)
59 inert a ~ ((fsk3, TF Int), TF Int)
60 inert fsk ~ ((fsk3, TF Int), TF Int)
61
62 -}