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