Modify a couple of error messages slightly
[ghc.git] / testsuite / tests / gadt / data2.hs
1 {-# LANGUAGE GADTs, ExistentialQuantification #-}
2
3 -- Trac #289
4
5 module ShouldCompile where
6
7 class Foo a where
8 foo :: a -> Int
9
10 data T = forall a. T (G a)
11 data G a where
12 A :: G a
13 B :: Foo a => a -> G a
14
15 doFoo :: T -> Int
16 doFoo (T A) = 2
17 doFoo (T (B x)) = foo x
18
19