summaryrefslogtreecommitdiff
path: root/testsuite/tests/generics
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2015-07-30 15:08:28 +0200
committerBen Gamari <ben@smart-cactus.org>2015-07-30 17:05:35 +0200
commit4f80ec0ee438800d95673a4898e69371957fed09 (patch)
tree47b00b465f2e700aed1e50333c8e0f74e3a754e1 /testsuite/tests/generics
parent26315ed282db2eb1977872bbcb0b298f32b38e99 (diff)
downloadhaskell-4f80ec0ee438800d95673a4898e69371957fed09.tar.gz
Improve error message for newtypes and deriving clauses
Summary: Change the error message generated when a deriving clause related to a newtype fails to always suggested trying GeneralizedNewtypeDeriving, even in situations where it may not work. Fixes #9600. Test Plan: testsuite/deriving/should_fail/9600.hs Reviewers: austin, bgamari, simonpj Rebased-by: bgamari Reviewed By: simonpj Subscribers: bgamari, hvr, simonmar, carter Differential Revision: https://phabricator.haskell.org/D216 GHC Trac Issues: #9600
Diffstat (limited to 'testsuite/tests/generics')
-rw-r--r--testsuite/tests/generics/T5462No1.stderr12
1 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/tests/generics/T5462No1.stderr b/testsuite/tests/generics/T5462No1.stderr
index 87ef888461..7c1aec8d79 100644
--- a/testsuite/tests/generics/T5462No1.stderr
+++ b/testsuite/tests/generics/T5462No1.stderr
@@ -1,20 +1,20 @@
[1 of 2] Compiling GFunctor ( GFunctor/GFunctor.hs, out_T5462No1/GFunctor.o )
[2 of 2] Compiling T5462No1 ( T5462No1.hs, out_T5462No1/T5462No1.o )
-T5462No1.hs:24:42:
+T5462No1.hs:24:42: error:
Can't make a derived instance of ‘GFunctor F’:
- ‘GFunctor’ is not a derivable class
+ ‘GFunctor’ is not a standard derivable class (Eq, Show, etc.)
Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension
In the newtype declaration for ‘F’
-T5462No1.hs:26:23:
+T5462No1.hs:26:23: error:
Can't make a derived instance of ‘C1 G’:
- ‘C1’ is not a derivable class
+ ‘C1’ is not a standard derivable class (Eq, Show, etc.)
Try enabling DeriveAnyClass
In the data declaration for ‘G’
-T5462No1.hs:27:23:
+T5462No1.hs:27:23: error:
Can't make a derived instance of ‘C2 H’:
- ‘C2’ is not a derivable class
+ ‘C2’ is not a standard derivable class (Eq, Show, etc.)
Try enabling DeriveAnyClass
In the data declaration for ‘H’