summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered16.hs
blob: b3e7f34586da9b82881e43ee5e8a74e8a06fe232 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# OPTIONS_GHC -fwarn-unsafe -Werror #-}
{-# LANGUAGE FlexibleInstances #-}
module UnsafeInfered16 where

class C a where
  f :: a -> String

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

instance {-# OVERLAPS #-} C Int where
  f _ = "Int"

instance {-# OVERLAPPABLE #-} C Bool where
  f _ = "Bool"