diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2018-09-25 11:58:12 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-09-25 11:58:12 +0200 |
commit | 9bfbc4e16d511678cffa9f7f76b369c8cfca7a66 (patch) | |
tree | 16c1f3ba6ef57d056a863cb71e67aaa349c1a73a /testsuite | |
parent | a38eaa66af711abd22a72774ae0f4cf95b2bff7a (diff) | |
download | haskell-9bfbc4e16d511678cffa9f7f76b369c8cfca7a66.tar.gz |
Don't show constraint tuples in errors (#14907)
Summary:
This means that 'GHC.Classes.(%,%)' is no longer mentioned in
error messages for things like
class (a,b,c) -- outside of 'GHC.Classes'
class (a,Bool)
Test Plan: make TEST=T14907a && make TEST=T14907b
Reviewers: RyanGlScott, bgamari
Reviewed By: RyanGlScott
Subscribers: rwbarton, carter
GHC Trac Issues: #14907
Differential Revision: https://phabricator.haskell.org/D5172
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/rename/should_fail/T14907a.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T14907a.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T14907b.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T14907b.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/all.T | 2 |
5 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T14907a.hs b/testsuite/tests/rename/should_fail/T14907a.hs new file mode 100644 index 0000000000..d68e706b16 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T14907a.hs @@ -0,0 +1,3 @@ +module T14907a where + +class (Bool, a, b) diff --git a/testsuite/tests/rename/should_fail/T14907a.stderr b/testsuite/tests/rename/should_fail/T14907a.stderr new file mode 100644 index 0000000000..26ce914c3d --- /dev/null +++ b/testsuite/tests/rename/should_fail/T14907a.stderr @@ -0,0 +1,6 @@ + +T14907a.hs:3:8: error: + Unexpected type ‘Bool’ + In the class declaration for ‘(,,)’ + A class declaration should have form + class (,,) a b c where ... diff --git a/testsuite/tests/rename/should_fail/T14907b.hs b/testsuite/tests/rename/should_fail/T14907b.hs new file mode 100644 index 0000000000..4cd4f282e4 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T14907b.hs @@ -0,0 +1,7 @@ +module T14907b where + +-- This is effectively trying to redefine the constraint tuples already +-- defined in 'GHC.Classes'. +class () +class (a,b) +class (a,b,c) diff --git a/testsuite/tests/rename/should_fail/T14907b.stderr b/testsuite/tests/rename/should_fail/T14907b.stderr new file mode 100644 index 0000000000..b76cc11e2a --- /dev/null +++ b/testsuite/tests/rename/should_fail/T14907b.stderr @@ -0,0 +1,6 @@ + +T14907b.hs:5:1: error: Illegal binding of built-in syntax: () + +T14907b.hs:6:1: error: Illegal binding of built-in syntax: (,) + +T14907b.hs:7:1: error: Illegal binding of built-in syntax: (,,) diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 182dc421fb..db0db47ca9 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -131,6 +131,8 @@ test('T13947', normal, compile_fail, ['']) test('T13847', normal, multimod_compile_fail, ['T13847','-v0']) test('T14307', normal, compile_fail, ['']) test('T14591', normal, compile_fail, ['']) +test('T14907a', normal, compile_fail, ['']) +test('T14907b', normal, compile_fail, ['']) test('T15214', normal, compile_fail, ['']) test('T15539', normal, compile_fail, ['']) test('T15487', normal, multimod_compile_fail, ['T15487','-v0']) |