[commit: ghc] ghc-7.8: Recharacterize test according to discussion in #8851. (917e374)

git at git.haskell.org git at git.haskell.org
Mon Mar 17 15:37:06 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/917e3743a91f7479bbd54963d17d3621cfd064ff/ghc

>---------------------------------------------------------------

commit 917e3743a91f7479bbd54963d17d3621cfd064ff
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Thu Mar 13 15:12:27 2014 -0400

    Recharacterize test according to discussion in #8851.
    
    (cherry picked from commit 8ee6162e9a3377cd4c79f49b63f92046b0d5c708)
    
    Conflicts:
    	testsuite/tests/deriving/should_compile/all.T


>---------------------------------------------------------------

917e3743a91f7479bbd54963d17d3621cfd064ff
 testsuite/tests/deriving/should_compile/all.T              |    1 -
 .../deriving/{should_compile => should_fail}/T8851.hs      |    0
 testsuite/tests/deriving/should_fail/T8851.stderr          |   12 ++++++++++++
 testsuite/tests/deriving/should_fail/all.T                 |    1 +
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index 4c1f545..257a9b2 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -45,4 +45,3 @@ test('T8138', reqlib('primitive'), compile, ['-O2'])
 test('T8631', normal, compile, [''])
 test('T8758', extra_clean(['T8758a.o', 'T8758a.hi']), multimod_compile, ['T8758a', '-v0'])
 test('T8865', normal, compile, [''])
-test('T8851', expect_broken(8851), compile, [''])
diff --git a/testsuite/tests/deriving/should_compile/T8851.hs b/testsuite/tests/deriving/should_fail/T8851.hs
similarity index 100%
rename from testsuite/tests/deriving/should_compile/T8851.hs
rename to testsuite/tests/deriving/should_fail/T8851.hs
diff --git a/testsuite/tests/deriving/should_fail/T8851.stderr b/testsuite/tests/deriving/should_fail/T8851.stderr
new file mode 100644
index 0000000..348f1f1
--- /dev/null
+++ b/testsuite/tests/deriving/should_fail/T8851.stderr
@@ -0,0 +1,12 @@
+
+T8851.hs:24:12:
+    Could not coerce from ‘Monad Parser’ to ‘Monad MyParser’
+      because the first type argument of ‘Monad’ has role Nominal,
+      but the arguments ‘Parser’ and ‘MyParser’ differ
+      arising from the coercion of the method ‘notFollowedBy’ from type
+                   ‘forall a. (Monad Parser, Show a) => Parser a -> Parser ()’ to type
+                   ‘forall a. (Monad MyParser, Show a) => MyParser a -> MyParser ()’
+    Possible fix:
+      use a standalone 'deriving instance' declaration,
+        so you can specify the instance context yourself
+    When deriving the instance for (Parsing MyParser)
diff --git a/testsuite/tests/deriving/should_fail/all.T b/testsuite/tests/deriving/should_fail/all.T
index 1ffa5fc..d503b6e 100644
--- a/testsuite/tests/deriving/should_fail/all.T
+++ b/testsuite/tests/deriving/should_fail/all.T
@@ -49,3 +49,4 @@ test('T7148a', normal, compile_fail, [''])
 test('T7800', normal, multimod_compile_fail, ['T7800',''])
 test('T5498', normal, compile_fail, [''])
 test('T6147', normal, compile_fail, [''])
+test('T8851', normal, compile_fail, [''])



More information about the ghc-commits mailing list