Handle DuplicateRecordFields correctly in filterImports (fixes #14487)
authorAdam Gundry <adam@well-typed.com>
Sun, 17 Jun 2018 14:47:57 +0000 (10:47 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sun, 17 Jun 2018 15:16:44 +0000 (11:16 -0400)
commitccd8ce405db89142932daea3fdace8814b110798
tree47ce56a9d5685312d0e70ea7a2e711090a129c27
parent9897440ec9fbf17fb609e9a0d9456861c5f7f24a
Handle DuplicateRecordFields correctly in filterImports (fixes #14487)

filterImports needed a small adjustment to correctly handle record field
definitions arising from modules with DuplicateRecordFields enabled.

Previously hiding fields was not possible with DuplicateRecordFields enabled.

Test Plan: new test rename/should_compile/T14487

Reviewers: bgamari

Subscribers: simonpj, rwbarton, thomie, carter

GHC Trac Issues: #14487

Differential Revision: https://phabricator.haskell.org/D4805
compiler/basicTypes/Avail.hs
compiler/rename/RnNames.hs
compiler/typecheck/TcRnExports.hs
testsuite/tests/overloadedrecflds/should_fail/DuplicateExports.hs [new file with mode: 0644]
testsuite/tests/overloadedrecflds/should_fail/DuplicateExports.stderr [new file with mode: 0644]
testsuite/tests/overloadedrecflds/should_fail/all.T
testsuite/tests/rename/should_compile/T14487.hs [new file with mode: 0644]
testsuite/tests/rename/should_compile/T14487A.hs [new file with mode: 0644]
testsuite/tests/rename/should_compile/all.T