diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-03-07 16:45:55 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-03-07 16:51:37 +0000 |
commit | cdac487bcd9928d77738f6e79ead7b9bb4bc00fd (patch) | |
tree | 76a3750754f317b81987e00a66c4ce188eecf181 /testsuite/tests/generics | |
parent | 3efcb0a7d147e05f86501783144bcd0ad3757e93 (diff) | |
download | haskell-cdac487bcd9928d77738f6e79ead7b9bb4bc00fd.tar.gz |
Make -XDeriveFunctor more generous about non-last arguments (Trac #8678)
When deriving Functor, Foldable, Traversable, we need only look at the
way that the last type argument is treated. It's fine for there to
be existentials etc, provided they don't affect the last type argument.
See Note [Check that the type variable is truly universal] in TcDeriv.
Diffstat (limited to 'testsuite/tests/generics')
-rw-r--r-- | testsuite/tests/generics/GenCannotDoRep0_0.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/generics/GenCannotDoRep1_0.stderr | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/testsuite/tests/generics/GenCannotDoRep0_0.stderr b/testsuite/tests/generics/GenCannotDoRep0_0.stderr index 3537dac4d6..e1292b8e7e 100644 --- a/testsuite/tests/generics/GenCannotDoRep0_0.stderr +++ b/testsuite/tests/generics/GenCannotDoRep0_0.stderr @@ -4,7 +4,8 @@ GenCannotDoRep0_0.hs:6:14: Warning: GenCannotDoRep0_0.hs:13:45: Can't make a derived instance of ‘Generic Dynamic’: - Dynamic must be a vanilla data constructor + Constructor ‘Dynamic’ has existentials or constraints in its type + Possible fix: use a standalone deriving declaration instead In the data declaration for ‘Dynamic’ GenCannotDoRep0_0.hs:17:1: diff --git a/testsuite/tests/generics/GenCannotDoRep1_0.stderr b/testsuite/tests/generics/GenCannotDoRep1_0.stderr index e40f359613..7764f24662 100644 --- a/testsuite/tests/generics/GenCannotDoRep1_0.stderr +++ b/testsuite/tests/generics/GenCannotDoRep1_0.stderr @@ -1,5 +1,6 @@ GenCannotDoRep1_0.hs:9:49: Can't make a derived instance of ‘Generic1 Dynamic’: - Dynamic must be a vanilla data constructor + Constructor ‘Dynamic’ has existentials or constraints in its type + Possible fix: use a standalone deriving declaration instead In the data declaration for ‘Dynamic’ |