Avoid mangled/derived names in GHCi autocomplete (fixes #11328)

Authored by adamgundry on Jan 30 2016, 3:03 PM.



This changes getRdrNamesInScope to use field labels rather than
selector names for fields from modules with DuplicateRecordFields
enabled. Moreover, it filters out derived names (e.g. type
representation bindings) that shouldn't show up in autocomplete.

Test Plan

New test ghci/should_run/T11328

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
adamgundry updated this revision to Diff 6505.Jan 30 2016, 3:03 PM
adamgundry retitled this revision from to Avoid mangled/derived names in GHCi autocomplete (fixes #11328).
adamgundry updated this object.
adamgundry edited the test plan for this revision. (Show Details)
adamgundry added reviewers: kolmodin, austin, bgamari.
adamgundry updated the Trac tickets for this revision.
bgamari accepted this revision.Jan 31 2016, 3:50 AM
bgamari edited edge metadata.


This revision is now accepted and ready to land.Jan 31 2016, 3:50 AM
simonpj accepted this revision.Feb 1 2016, 2:40 AM
simonpj added a reviewer: simonpj.
simonpj added a subscriber: simonpj.
simonpj added inline comments.

Add comment right here

--Exclude internally generated names; see e.g. Trac #11328
bgamari added inline comments.Feb 1 2016, 9:41 AM

I can do this when I merge.

This revision was automatically updated to reflect the committed changes.