6523193db3e25ef2f7a4e0f62ebaa0dbc9e9d09c
[ghc.git] / testsuite / tests / safeHaskell / overlapping / SH_Overlap8.hs
1 {-# LANGUAGE Safe #-}
2 {-# LANGUAGE FlexibleInstances #-}
3
4 -- | Overlapping instances, but with a single parameter type-class and no
5 -- orphans. So `SH_Overlap8` decided to explictly depend on `SH_Overlap8_A`
6 -- since that's where the type-class `C` with function `f` is defined.
7 --
8 -- Question: Safe or Unsafe? Safe
9 module SH_Overlap8 where
10
11 import safe SH_Overlap8_A
12
13 instance C [a] where
14 f _ = "[a]"
15
16 test :: String
17 test = f ([1,2,3,4] :: [Int])
18