Fix interaction of DuplicateRecordFields and GHC.Generics
authorAdam Gundry <adam@well-typed.com>
Thu, 19 Nov 2015 11:53:46 +0000 (12:53 +0100)
committerBen Gamari <ben@smart-cactus.org>
Thu, 19 Nov 2015 12:24:32 +0000 (13:24 +0100)
commit2442038554440923179d532137199d5290875cff
tree5a5f90dc1a0059465f2d4e47cc52beeb08e92d51
parenta586622c5386610e8ceffca7ef1efdf33d753587
Fix interaction of DuplicateRecordFields and GHC.Generics

This prevents GHC.Generics from exposing mangled selector names
when used on a datatype defined with DuplicateRecordFields enabled.

Test Plan:
New test overloadedrecflds_generics, which tests that both
GHC.Generics and Data.Data use the correct field labels, not mangled
names.

Reviewers: kosmikus, simonpj, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1486
compiler/typecheck/TcGenGenerics.hs
testsuite/tests/overloadedrecflds/should_run/all.T
testsuite/tests/overloadedrecflds/should_run/overloadedrecflds_generics.hs [new file with mode: 0644]
testsuite/tests/overloadedrecflds/should_run/overloadedrecflds_generics.stdout [new file with mode: 0644]