summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc063.hs
blob: 36affbfdcedbc2a306b67a64c3d3749d12169768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module ShouldSucceed where

data X a = Tag a 

class Reps r where
 f :: r -> r -> r

instance Reps (X q) where
-- f (Tag x) (Tag y) = Tag y
 f x y = y

instance Reps Bool where
 f True True = True
 f x y = False

g x = f x x