From 26ea1e825cd07e3b179aa4a0b1ba615b4787404b Mon Sep 17 00:00:00 2001 From: Jose Pedro Magalhaes Date: Wed, 4 May 2011 11:16:36 +0200 Subject: Adapt the testsuite to the recent ghc-generics changes. --- testsuite/tests/ghc-regress/generics/GEq/Main.hs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'testsuite/tests/ghc-regress/generics/GEq/Main.hs') diff --git a/testsuite/tests/ghc-regress/generics/GEq/Main.hs b/testsuite/tests/ghc-regress/generics/GEq/Main.hs index 7cb9f95b85..40e3d25a46 100644 --- a/testsuite/tests/ghc-regress/generics/GEq/Main.hs +++ b/testsuite/tests/ghc-regress/generics/GEq/Main.hs @@ -8,8 +8,13 @@ import GEq -- We should be able to generate a generic representation for these types data C = C0 | C1 + deriving Representable0 data D a = D0 | D1 { d11 :: a, d12 :: (D a) } + deriving Representable0 + +data (:**:) a b = a :**: b + deriving Representable0 -- Example values c0 = C0 @@ -19,13 +24,18 @@ d0 :: D Char d0 = D0 d1 = D1 'p' D0 +p1 :: Int :**: Char +p1 = 3 :**: 'p' + -- Generic instances -instance GEq C -instance (GEq a) => GEq (D a) +instance GEq C +instance (GEq a) => GEq (D a) +instance (GEq a, GEq b) => GEq (a :**: b) -- Tests teq0 = geq c0 c1 teq1 = geq d0 d1 teq2 = geq d0 d0 +teq3 = geq p1 p1 -main = mapM_ print [teq0, teq1, teq2] +main = mapM_ print [teq0, teq1, teq2, teq3] -- cgit v1.2.1