summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/drv003.hs
blob: 6fdd763f84ada0e49bf7b2ba941627b755d05ead (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# OPTIONS -fno-warn-redundant-constraints #-}

-- !!! This is the example given in TcDeriv
--
module ShouldSucceed where

data T a b
  = C1 (Foo a) (Bar b) 
  | C2 Int (T b a) 
  | C3 (T a a)
  deriving Eq

data Foo a = MkFoo Double a deriving ()
instance (Eq a) => Eq (Foo a)

data Bar a = MkBar Int Int deriving ()
instance (Ping b) => Eq (Bar b)

class Ping a