Look through type synonyms in existential contexts when deriving Functor
authorRyan Scott <ryan.gl.scott@gmail.com>
Sun, 18 Jun 2017 18:23:43 +0000 (14:23 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Sun, 18 Jun 2017 18:23:43 +0000 (14:23 -0400)
commit85731000d8b13476ed3c5bde22af610a27fb00f8
tree84ee982aef942d7ad85ce1a5e3152ebf5b9751dd
parent559a0c5d5458401f54f3680f32675a958ccb0d2b
Look through type synonyms in existential contexts when deriving Functor

Summary:
This amounts to using `exactTyCoVarsOfType` instead of
`tyCoVarsOfType` in the right place. I also fixed a similar issue for
`-XDatatypeContexts` while I was in town (but couldn't be bothered to add a
test for it).

Test Plan: make test TEST=T13813

Reviewers: austin, bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rwbarton, thomie

GHC Trac Issues: #13813

Differential Revision: https://phabricator.haskell.org/D3635
compiler/typecheck/TcDerivUtils.hs
testsuite/tests/deriving/should_compile/T13813.hs [new file with mode: 0644]
testsuite/tests/deriving/should_compile/all.T