diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-07-05 17:09:47 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-07-10 09:26:22 +0100 |
commit | fd0f0334189c0c5c9b186bd1b009f706d3d86086 (patch) | |
tree | b1b0a9a59948be2fe51ba4a47b6e53fd6c562832 /testsuite/tests/deriving | |
parent | 55a3f8552c9dc9b84e204ec6623c698912795347 (diff) | |
download | haskell-fd0f0334189c0c5c9b186bd1b009f706d3d86086.tar.gz |
More refactoring in TcValidity
This patch responds to Trac #15334 by making it an error to
write an instance declaration for a tuple constraint like
(Eq [a], Show [a]).
I then discovered that instance validity checking was
scattered betweeen TcInstDcls and TcValidity, so I took
the time to bring it all together, into
TcValidity.checkValidInstHead
In doing so I discovered that there are lot of special
cases. I have not changed them, but at least they are
all laid out clearly now.
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r-- | testsuite/tests/deriving/should_fail/T14916.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_fail/T9687.stderr | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/testsuite/tests/deriving/should_fail/T14916.stderr b/testsuite/tests/deriving/should_fail/T14916.stderr index 2a6cca187d..81f94650f5 100644 --- a/testsuite/tests/deriving/should_fail/T14916.stderr +++ b/testsuite/tests/deriving/should_fail/T14916.stderr @@ -1,10 +1,8 @@ T14916.hs:7:24: error: - • Illegal instance declaration for ‘A ~ A’ - Manual instances of this class are not permitted. + • Class ‘~’ does not support user-specified instances • In the data declaration for ‘A’ T14916.hs:8:24: error: - • Illegal instance declaration for ‘Coercible B B’ - Manual instances of this class are not permitted. + • Class ‘Coercible’ does not support user-specified instances • In the data declaration for ‘B’ diff --git a/testsuite/tests/deriving/should_fail/T9687.stderr b/testsuite/tests/deriving/should_fail/T9687.stderr index a98f775bee..4c3dfe8255 100644 --- a/testsuite/tests/deriving/should_fail/T9687.stderr +++ b/testsuite/tests/deriving/should_fail/T9687.stderr @@ -1,5 +1,5 @@ -T9687.hs:4:1: error: +T9687.hs:4:10: error: • Class ‘Typeable’ does not support user-specified instances • In the instance declaration for ‘Typeable (a, b, c, d, e, f, g, h)’ |