Don't suppress unimplemented type family warnings with DeriveAnyClass
authorRyan Scott <ryan.gl.scott@gmail.com>
Sat, 12 Aug 2017 19:46:44 +0000 (15:46 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Sat, 12 Aug 2017 19:46:44 +0000 (15:46 -0400)
commit3f05e5f6becc2f7174898726b6f027105b12a780
tree54189ff786c9f176db04ab575590f3d2a8514792
parenta4f347c23ed926c24d178fec54c27d94f1fae0e4
Don't suppress unimplemented type family warnings with DeriveAnyClass

Summary:
For some asinine reason, we were suppressing warnings when
deriving associated type family instances with `DeriveAnyClass`. That seems
like a bad idea. Let's not do that.

Along the way, I noticed that the error contexts associated with these
newly emitted warnings were less than ideal, so I did some minor refactoring
to improve the story there.

Fixes #14094

Test Plan: ./validate

Reviewers: bgamari, austin

Subscribers: rwbarton, thomie

GHC Trac Issues: #14094

Differential Revision: https://phabricator.haskell.org/D3828
compiler/typecheck/TcClassDcl.hs
compiler/typecheck/TcDeriv.hs
compiler/typecheck/TcInstDcls.hs
testsuite/tests/deriving/should_compile/T14094.hs [new file with mode: 0644]
testsuite/tests/deriving/should_compile/T14094.stderr [new file with mode: 0644]
testsuite/tests/deriving/should_compile/all.T
testsuite/tests/deriving/should_fail/T10598_fail3.stderr
testsuite/tests/deriving/should_fail/T8165_fail2.stderr