Typeable: Ensure that promoted data family instance tycons get bindings
authorBen Gamari <bgamari.foss@gmail.com>
Wed, 19 Jul 2017 23:33:00 +0000 (19:33 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 20 Jul 2017 02:05:03 +0000 (22:05 -0400)
commitcc839c57ff9c80b50d39e8e2e66a18674bab3486
tree2419246951641c0f37dfb981655e8c6e10385036
parentb066d936a919f6943de1acdc358d9e014b2cc663
Typeable: Ensure that promoted data family instance tycons get bindings

This fixes #13915, where the promoted tycons belonging to data family
instances wouldn't get Typeable bindings, resulting in missing
declarations.

Test Plan: Validate with included testcases

Reviewers: austin, simonpj

Reviewed By: simonpj

Subscribers: simonpj, RyanGlScott, rwbarton, thomie

GHC Trac Issues: #13915

Differential Revision: https://phabricator.haskell.org/D3759
compiler/typecheck/TcEnv.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcTypeable.hs
testsuite/tests/perf/compiler/all.T
testsuite/tests/typecheck/should_compile/T13915a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T13915a_Foo.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T13915b.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T