summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/drv003.hs
blob: 0b8149ce8a097db30af89208ff9ad424a01beca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- !!! 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