Testsuite error message changes
[ghc.git] / testsuite / tests / indexed-types / should_compile / Simple13.hs
1 {-# LANGUAGE TypeFamilies #-}
2
3 -- This should fail, I think, because of the loopy equality,
4 -- but the error message is hopeless
5
6 module Simple13 where
7
8 type family F a
9
10 same :: a -> a -> a
11 same = undefined
12
13 mkf :: a -> [F a]
14 mkf p = undefined
15
16 foo :: a ~ [F a] => a -> a
17 foo p = same p (mkf p)
18
19 {- p :: a
20
21 [G] g : a ~ [F a]
22 [W] w : a ~ [F a]
23
24 --->
25 g' = g;[x] g'=aq4
26 [G] g' : a ~ [fsk] g=aqW
27 [W] x : F a ~ fsk x=aq3
28
29 [W] w : a ~ [F a]
30
31 --> subst a
32 x = F g' ; x2
33 [W] x2 : F fsk ~ fsk x2=aq5
34
35 --> (subst a)
36 w = g' ; w2
37 [W] w2 : [fsk] ~ [F a]
38
39 --> decompose
40 w2 = [w3]
41 [W] w3 : fsk ~ F a
42
43
44
45 cycle is
46 aq3 = Sym (F aq4) ; aq5 x = Sym (F g') ; x2
47 aq4 = apw ; aq3 g' =
48 -}