diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-09-30 14:33:19 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-09-30 14:33:19 +0100 |
commit | 3f27237b0e6d31c674f65284138ade50f26eab0c (patch) | |
tree | 8f6caf7fcca5683e9cf905ec24676f839ee37587 | |
parent | 5d473cd6cce27347f070b76199f1607206c5c869 (diff) | |
download | haskell-3f27237b0e6d31c674f65284138ade50f26eab0c.tar.gz |
Make tcrun042 fail
This test uses wholesale impredicative polymorphism, and now fails.
That's ok.
-rwxr-xr-x | testsuite/tests/typecheck/should_run/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_run/tcrun042.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_run/tcrun042.stderr | 6 |
3 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/tests/typecheck/should_run/all.T b/testsuite/tests/typecheck/should_run/all.T index c2b277d7d5..fa6273a06d 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 1ea5c2467f..ba4251c334 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 0000000000..52d9b29693 --- /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",) |