[commit: ghc] master: Make tcrun042 fail (3f27237)

git at git.haskell.org git at git.haskell.org
Fri Sep 30 13:34:05 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3f27237b0e6d31c674f65284138ade50f26eab0c/ghc

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

commit 3f27237b0e6d31c674f65284138ade50f26eab0c
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Sep 30 14:33:19 2016 +0100

    Make tcrun042 fail
    
    This test uses wholesale impredicative polymorphism, and now fails.
    That's ok.


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

3f27237b0e6d31c674f65284138ade50f26eab0c
 testsuite/tests/typecheck/should_run/all.T           | 2 +-
 testsuite/tests/typecheck/should_run/tcrun042.hs     | 8 ++++++++
 testsuite/tests/typecheck/should_run/tcrun042.stderr | 6 ++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/typecheck/should_run/all.T b/testsuite/tests/typecheck/should_run/all.T
index c2b277d..fa6273a 100755
--- a/testsuite/tests/typecheck/should_run/all.T
+++ b/testsuite/tests/typecheck/should_run/all.T
@@ -62,7 +62,7 @@ test('tcrun038',
 test('tcrun039', normal, compile_and_run, [''])
 test('tcrun040', normal, compile_and_run, [''])
 test('tcrun041', omit_ways(['ghci']), compile_and_run, [''])
-test('tcrun042', normal, compile_and_run, [''])
+test('tcrun042', normal, compile_fail, [''])
 test('tcrun043', normal, compile_and_run, [''])
 test('tcrun044', normal, compile_and_run, [''])
 test('tcrun045', normal, compile_fail, [''])
diff --git a/testsuite/tests/typecheck/should_run/tcrun042.hs b/testsuite/tests/typecheck/should_run/tcrun042.hs
index 1ea5c24..ba4251c 100644
--- a/testsuite/tests/typecheck/should_run/tcrun042.hs
+++ b/testsuite/tests/typecheck/should_run/tcrun042.hs
@@ -1,4 +1,12 @@
 {-# LANGUAGE TupleSections, RankNTypes, ImpredicativeTypes #-}
+
+-- Sept 16: This test involves wholesale use of impredicative polymorhism
+--          and I'm amazed it has worked for so long. Anyway it is now
+--          failing, which is OK.  We don't really suport impredicative
+--          polymorphism!
+--
+-- The test was added by Max in 5e8ff849, appretly to test tuple sections
+
 module Main where
 
 e :: a -> (forall b. b -> b -> b) -> (a, String, forall c. c -> c -> c)
diff --git a/testsuite/tests/typecheck/should_run/tcrun042.stderr b/testsuite/tests/typecheck/should_run/tcrun042.stderr
new file mode 100644
index 0000000..52d9b29
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/tcrun042.stderr
@@ -0,0 +1,6 @@
+
+tcrun042.hs:13:5: error:
+    • Couldn't match expected type ‘forall c. c -> c -> c’
+                  with actual type ‘b0 -> b0 -> b0’
+    • In the expression: (, "Hello" ++ "World",)
+      In an equation for ‘e’: e = (, "Hello" ++ "World",)



More information about the ghc-commits mailing list