Testsuite error message changes
[ghc.git] / testsuite / tests / indexed-types / should_fail / T2627b.hs
1 {-# LANGUAGE GADTs, TypeFamilies, EmptyDataDecls #-}
2
3 module T2627b where
4
5 data R a b
6 data W a b
7 data Z
8
9 type family Dual a
10 type instance Dual Z = Z
11 type instance Dual (R a b) = W a (Dual b)
12 type instance Dual (W a b) = R a (Dual b)
13
14 data Comm a where
15 Rd :: (c -> Comm d) -> Comm (R c d)
16 Wr :: e -> Comm f -> Comm (W e f)
17 Fin :: Int -> Comm Z
18
19 conn :: (Dual a ~ b, Dual b ~ a) => Comm a -> Comm b -> (Int, Int)
20 conn (Rd k) (Wr a r) = conn undefined undefined
21
22 {-
23 [G] a ~ R c d
24 [G] b ~ W e f
25 [W] Dual alpha ~ beta, [W] Dual beta ~ alpha
26 -}