summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/overlapping/SH_Overlap9.hs
blob: 5ae00fa101facea6be422f91db0fca9f35c5fc11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# OPTIONS_GHC -fwarn-safe #-}
{-# LANGUAGE FlexibleInstances #-}

-- | Same as `SH_Overlap6`, but now we are inferring safety. Should be inferred
-- unsafe due to overlapping instances at call site `f`.
module SH_Overlap9 where

import SH_Overlap9_A

instance
  C [a] where
    f _ = "[a]"

test :: String
test = f ([1,2,3,4] :: [Int])