New handling of overlapping inst in Safe Haskell
[ghc.git] / testsuite / tests / safeHaskell / overlapping / SH_Overlap7.hs
1 {-# OPTIONS_GHC -fwarn-unsafe #-}
2 {-# LANGUAGE FlexibleInstances #-}
3
4 -- | Same as `SH_Overlap6`, but now we are inferring safety. Should be inferred
5 -- unsafe due to overlapping instances at call site `f`.
6 module SH_Overlap7 where
7
8 import SH_Overlap7_A
9
10 instance C [a] where
11 f _ = "[a]"
12
13 test :: String
14 test = f ([1,2,3,4] :: [Int])
15