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

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

Details

Summary

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

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 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.

Thanks!

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.
compiler/main/InteractiveEval.hs
811–812

Add comment right here

--Exclude internally generated names; see e.g. Trac #11328
bgamari added inline comments.Feb 1 2016, 9:41 AM
compiler/main/InteractiveEval.hs
811–812

I can do this when I merge.

This revision was automatically updated to reflect the committed changes.