1{-# LANGUAGE FlexibleInstances #-} 2{-# LANGUAGE MultiParamTypeClasses #-} 3module Overlapping where 4 5class C a b where 6 f :: a -> b -> Bool 7 8instance C a b where 9 f _ _ = False 10 11instance {-# OVERLAPPING #-} C a a where 12 f _ _ = True 13 14instance {-# OVERLAPS #-} C a a where 15 f _ _ = True 16 17instance {-# OVERLAPPABLE #-} C a a where 18 f _ _ = True 19