Commit 44328639 authored by David Terei's avatar David Terei

Update some tests for recent Safe Haskell change.

parent 1b476920
data Foo = Foo -- Defined at T5820.hs:2:1 data Foo = Foo -- Defined at T5820.hs:2:1
instance Eq Foo -- Defined at T5820.hs:3:10 instance [safe] Eq Foo -- Defined at T5820.hs:3:10
data Foo = Foo -- Defined at T5820.hs:2:1 data Foo = Foo -- Defined at T5820.hs:2:1
instance Eq Foo -- Defined at T5820.hs:3:10 instance [safe] Eq Foo -- Defined at T5820.hs:3:10
data Foo = Foo -- Defined at ghci019.hs:8:1 data Foo = Foo -- Defined at ghci019.hs:8:1
instance Eq Foo -- Defined at ghci019.hs:9:10 instance [safe] Eq Foo -- Defined at ghci019.hs:9:10
<interactive>:10:1: <interactive>:10:1: error:
Overlapping instances for C [Int] arising from a use of ‘f’ Overlapping instances for C [Int] arising from a use of ‘f’
Matching instances: Matching instances:
instance C [Int] -- Defined at <interactive>:7:10 instance [safe] C [Int] -- Defined at <interactive>:7:10
instance C a => C [a] -- Defined at <interactive>:9:10 instance [safe] C a => C [a] -- Defined at <interactive>:9:10
In the expression: f [4 :: Int] In the expression: f [4 :: Int]
In an equation for ‘it’: it = f [4 :: Int] In an equation for ‘it’: it = f [4 :: Int]
T4912.hs:10:10: Warning: T4912.hs:10:10: warning:
Orphan instance: instance Foo TheirData Orphan instance: instance [safe] Foo TheirData
To avoid this To avoid this
move the instance declaration to the module of the class or of the type, or move the instance declaration to the module of the class or of the type, or
wrap the type with a newtype and declare the instance on the new type. wrap the type with a newtype and declare the instance on the new type.
T4912.hs:13:10: Warning: T4912.hs:13:10: warning:
Orphan instance: instance Bar OurData Orphan instance: instance [safe] Bar OurData
To avoid this To avoid this
move the instance declaration to the module of the class or of the type, or move the instance declaration to the module of the class or of the type, or
wrap the type with a newtype and declare the instance on the new type. wrap the type with a newtype and declare the instance on the new type.
[1 of 2] Compiling T9178DataType ( T9178DataType.hs, T9178DataType.o ) [1 of 2] Compiling T9178DataType ( T9178DataType.hs, T9178DataType.o )
[2 of 2] Compiling T9178 ( T9178.hs, T9178.o ) [2 of 2] Compiling T9178 ( T9178.hs, T9178.o )
T9178.hs:8:10: Warning: T9178.hs:8:10: warning:
Orphan instance: instance Show T9178_Type Orphan instance: instance [safe] Show T9178_Type
To avoid this To avoid this
move the instance declaration to the module of the class or of the type, or move the instance declaration to the module of the class or of the type, or
wrap the type with a newtype and declare the instance on the new type. wrap the type with a newtype and declare the instance on the new type.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment