Modify a couple of error messages slightly
[ghc.git] / testsuite / tests / gadt / gadt18.hs
1 {-# LANGUAGE GADTs #-}
2 -- A simple GADT test from Roman
3 -- which nevertheless showed up a bug at one stage
4
5 module ShouldCompile where
6
7 data T a where
8 T1 :: () -> T ()
9 T2 :: T a -> T b -> T (a,b)
10
11 class C a where
12 f :: T a -> a
13
14 instance C () where
15 f (T1 x) = x
16
17 instance (C a, C b) => C (a,b) where
18 f (T2 x y) = (f x, f y)