[commit: testsuite] master: Update error messages; and SimpleFail10 now passes (395a9c5)
Simon Peyton Jones
simonpj at microsoft.com
Thu Sep 1 10:34:55 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/395a9c522c8cc41e2e892bc778fe6970fe66f2d7
>---------------------------------------------------------------
commit 395a9c522c8cc41e2e892bc778fe6970fe66f2d7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Sep 1 09:34:45 2011 +0100
Update error messages; and SimpleFail10 now passes
>---------------------------------------------------------------
tests/indexed-types/should_fail/SimpleFail10.hs | 2 +-
.../indexed-types/should_fail/SimpleFail10.stderr | 6 ------
tests/indexed-types/should_fail/SimpleFail2a.hs | 2 +-
.../indexed-types/should_fail/SimpleFail2a.stderr | 9 +++++----
.../indexed-types/should_fail/SimpleFail2b.stderr | 8 ++++----
tests/indexed-types/should_fail/all.T | 2 +-
6 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/tests/indexed-types/should_fail/SimpleFail10.hs b/tests/indexed-types/should_fail/SimpleFail10.hs
index 7235f67..4bd7bde 100644
--- a/tests/indexed-types/should_fail/SimpleFail10.hs
+++ b/tests/indexed-types/should_fail/SimpleFail10.hs
@@ -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
diff --git a/tests/indexed-types/should_fail/SimpleFail10.stderr b/tests/indexed-types/should_fail/SimpleFail10.stderr
index d07d292..e69de29 100644
--- a/tests/indexed-types/should_fail/SimpleFail10.stderr
+++ b/tests/indexed-types/should_fail/SimpleFail10.stderr
@@ -1,6 +0,0 @@
-
-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'
diff --git a/tests/indexed-types/should_fail/SimpleFail2a.hs b/tests/indexed-types/should_fail/SimpleFail2a.hs
index 011426f..fc773af 100644
--- a/tests/indexed-types/should_fail/SimpleFail2a.hs
+++ b/tests/indexed-types/should_fail/SimpleFail2a.hs
@@ -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
diff --git a/tests/indexed-types/should_fail/SimpleFail2a.stderr b/tests/indexed-types/should_fail/SimpleFail2a.stderr
index 56e06e3..3743d05 100644
--- a/tests/indexed-types/should_fail/SimpleFail2a.stderr
+++ b/tests/indexed-types/should_fail/SimpleFail2a.stderr
@@ -1,5 +1,6 @@
-SimpleFail2a.hs:11:11:
- Conflicting definitions for `Sd'
- Bound at: SimpleFail2a.hs:11:11-12
- SimpleFail2a.hs:12:11-12
+SimpleFail2a.hs:11:3:
+ 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'
diff --git a/tests/indexed-types/should_fail/SimpleFail2b.stderr b/tests/indexed-types/should_fail/SimpleFail2b.stderr
index cdb91de..2140eb0 100644
--- a/tests/indexed-types/should_fail/SimpleFail2b.stderr
+++ b/tests/indexed-types/should_fail/SimpleFail2b.stderr
@@ -1,5 +1,5 @@
-SimpleFail2b.hs:9:11:
- Conflicting definitions for `Sd'
- Bound at: SimpleFail2b.hs:9:11-12
- SimpleFail2b.hs:10:11-12
+SimpleFail2b.hs:10:11:
+ Conflicting family instance declarations:
+ data Sd Int -- Defined at SimpleFail2b.hs:10:11-12
+ data Sd Int -- Defined at SimpleFail2b.hs:9:11-12
diff --git a/tests/indexed-types/should_fail/all.T b/tests/indexed-types/should_fail/all.T
index bc3d121..4f81435 100644
--- a/tests/indexed-types/should_fail/all.T
+++ b/tests/indexed-types/should_fail/all.T
@@ -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, [''])
More information about the Cvs-ghc
mailing list