Do not warn about unused underscore-prefixed fields (fixes Trac #12609)
ClosedPublic

Authored by adamgundry on Sep 27 2016, 1:06 PM.

Details

Summary

When DuplicateRecordFields is enabled, the mangling of selector
names was causing them to be reported as unused even if prefixed by an
underscore. This corrects the OccName used by the check.

Test Plan

New test overloadedrecflds/should_compile/T12609

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamgundry updated this revision to Diff 8804.Sep 27 2016, 1:06 PM
adamgundry retitled this revision from to Do not warn about unused underscore-prefixed fields (fixes Trac #12609).
adamgundry updated this object.
adamgundry edited the test plan for this revision. (Show Details)
adamgundry added a reviewer: bgamari.
adamgundry updated the Trac tickets for this revision.
bgamari accepted this revision.Sep 27 2016, 1:55 PM
bgamari edited edge metadata.

This looks good to me.

compiler/rename/RnEnv.hs
2181

Thanks for the comment.

This revision is now accepted and ready to land.Sep 27 2016, 1:55 PM
This revision was automatically updated to reflect the committed changes.