Commit b7aa8a83 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Update error messages; and SimpleFail10 now passes

parent 6d43f0f7
...@@ -8,6 +8,6 @@ class C8 a where ...@@ -8,6 +8,6 @@ class C8 a where
instance C8 Int where instance C8 Int where
data S8 Int a = S8Int a data S8 Int a = S8Int a
-- must fail: extra arguments must be variables -- Extra argument is not a variable; this is fine
instance C8 Bool where instance C8 Bool where
data S8 Bool Char = S8Bool data S8 Bool Char = S8Bool
SimpleFail10.hs:13:3:
Arguments that do not correspond to a class parameter must be variables
Instead of a variable, found Char
In the data type instance declaration for `S8'
In the instance declaration for `C8 Bool'
...@@ -8,7 +8,7 @@ class C a where ...@@ -8,7 +8,7 @@ class C a where
type St a :: * type St a :: *
instance C Int where instance C Int where
data Sd a :: * -- must fail: parse error data Sd a :: * -- Looks like a nullary data instance decl
data Sd Int = SdC Char data Sd Int = SdC Char
newtype Sn Int = SnC Char newtype Sn Int = SnC Char
type St Int = Char type St Int = Char
SimpleFail2a.hs:11:11: SimpleFail2a.hs:11:3:
Conflicting definitions for `Sd' Type indexes must match class instance head
Bound at: SimpleFail2a.hs:11:11-12 Found `a' but expected `Int'
SimpleFail2a.hs:12:11-12 In the data type instance declaration for `Sd'
In the instance declaration for `C Int'
SimpleFail2b.hs:9:11: SimpleFail2b.hs:10:11:
Conflicting definitions for `Sd' Conflicting family instance declarations:
Bound at: SimpleFail2b.hs:9:11-12 data Sd Int -- Defined at SimpleFail2b.hs:10:11-12
SimpleFail2b.hs:10:11-12 data Sd Int -- Defined at SimpleFail2b.hs:9:11-12
...@@ -13,7 +13,7 @@ test('SimpleFail6', normal, compile_fail, ['']) ...@@ -13,7 +13,7 @@ test('SimpleFail6', normal, compile_fail, [''])
test('SimpleFail7', normal, compile_fail, ['']) test('SimpleFail7', normal, compile_fail, [''])
test('SimpleFail8', normal, compile_fail, ['']) test('SimpleFail8', normal, compile_fail, [''])
test('SimpleFail9', normal, compile_fail, ['']) test('SimpleFail9', normal, compile_fail, [''])
test('SimpleFail10', normal, compile_fail, ['']) test('SimpleFail10', normal, compile, [''])
test('SimpleFail11a', normal, compile_fail, ['']) test('SimpleFail11a', normal, compile_fail, [''])
test('SimpleFail11b', normal, compile_fail, ['']) test('SimpleFail11b', normal, compile_fail, [''])
test('SimpleFail11c', normal, compile_fail, ['']) test('SimpleFail11c', normal, compile_fail, [''])
......
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