Warn for Safe Haskell when -XOverlappingInstances or
[ghc.git] / testsuite / tests / safeHaskell / safeInfered / UnsafeInfered16.hs
1 {-# OPTIONS_GHC -fwarn-unsafe -Werror #-}
2 {-# LANGUAGE FlexibleInstances #-}
3 module UnsafeInfered16 where
4
5 class C a where
6 f :: a -> String
7
8 instance {-# OVERLAPPING #-} C a where
9 f _ = "a"
10
11 instance {-# OVERLAPS #-} C Int where
12 f _ = "Int"
13
14 instance {-# OVERLAPPABLE #-} C Bool where
15 f _ = "Bool"
16