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

Update error messages; and SimpleFail10 now passes

parent 6d43f0f7
......@@ -8,6 +8,6 @@ class C8 a where
instance C8 Int where
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
data S8 Bool Char = S8Bool
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
type St a :: *
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
newtype Sn Int = SnC Char
type St Int = Char
Conflicting definitions for `Sd'
Bound at: SimpleFail2a.hs:11:11-12
Type indexes must match class instance head
Found `a' but expected `Int'
In the data type instance declaration for `Sd'
In the instance declaration for `C Int'
Conflicting definitions for `Sd'
Bound at: SimpleFail2b.hs:9:11-12
Conflicting family instance declarations:
data Sd Int -- Defined at SimpleFail2b.hs:10:11-12
data Sd Int -- Defined at SimpleFail2b.hs:9:11-12
......@@ -13,7 +13,7 @@ test('SimpleFail6', normal, compile_fail, [''])
test('SimpleFail7', normal, compile_fail, [''])
test('SimpleFail8', normal, compile_fail, [''])
test('SimpleFail9', normal, compile_fail, [''])
test('SimpleFail10', normal, compile_fail, [''])
test('SimpleFail10', normal, compile, [''])
test('SimpleFail11a', normal, compile_fail, [''])
test('SimpleFail11b', normal, compile_fail, [''])
test('SimpleFail11c', normal, compile_fail, [''])
Supports Markdown
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