Testsuite error message changes
[ghc.git] / testsuite / tests / indexed-types / should_fail / T4093a.hs
1 {-# LANGUAGE TypeFamilies #-}
2 module T4093a where
3
4 type family Foo x
5 type instance Foo () = Maybe ()
6
7 hang :: (Foo e ~ Maybe e) => Foo e
8 hang = Just ()
9
10
11 {- Ambiguity check
12
13 [G] Foo e ~ Maybe e
14 [W] Foo e ~ Foo ee
15 [W] Foo ee ~ Maybe ee)
16 ---
17 [G] Foo e ~ fsk
18 [G] fsk ~ Maybe e
19
20 [W] Foo e ~ fmv1
21 [W] Foo ee ~ fmv2
22 [W] fmv1 ~ fmv2
23 [W] fmv2 ~ Maybe ee
24
25 ---> fmv1 := fsk
26 [W] Foo ee ~ fmv2
27 [W] fsk ~ fmv2
28 [W] fmv2 ~ Maybe ee
29
30 --->
31 [W] Foo ee ~ fmv2
32 [W] fmv2 ~ Maybe e
33 [W] fmv2 ~ Maybe ee
34
35 Now the question is whether we get a derived equality e ~ ee. Currently
36 we don't, but we easily could. But then we'd need to be careful not to
37 report insoluble Int ~ Bool if we had
38 F a ~ Int, F a ~ Bool
39 -}