packages feed

haskell-src-exts-1.20.0: tests/examples/Overlapping.hs.prettyprinter.golden

{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Overlapping where

class C a b where
        f :: a -> b -> Bool

instance C a b where
        f _ _ = False

instance {-# OVERLAPPING #-} C a a where
        f _ _ = True

instance {-# OVERLAPS #-} C a a where
        f _ _ = True

instance {-# OVERLAPPABLE #-} C a a where
        f _ _ = True