Make sure record pattern synonym selectors are in scope in GHCi.
authorMatthew Pickering <matthewtpickering@gmail.com>
Sun, 1 May 2016 22:11:30 +0000 (00:11 +0200)
committerBen Gamari <ben@smart-cactus.org>
Sun, 1 May 2016 22:12:01 +0000 (00:12 +0200)
commitcd85dc84b36bc5f600eb1b3805024a5b2443e1a3
tree1a37cca03441f0581c75a2712c72d0c658ecd40a
parentea34f565d370404f9ea5f8bcf6a8380ffa842c49
Make sure record pattern synonym selectors are in scope in GHCi.

Beforehand, when a record pattern synonym was defined in GHCi
the selectors would not be in scope. This is because of `is_sub_bndr`
in `HscTypes.icExtendGblRdrEnv` was throwing away the selectors.

This was broken by the fix to #10520 but it is easy to resolve.

Reviewers: austin, bgamari, simonpj

Reviewed By: simonpj

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2147

GHC Trac Issues: #11985
compiler/main/HscTypes.hs
testsuite/tests/patsyn/should_run/T11985.script [new file with mode: 0644]
testsuite/tests/patsyn/should_run/T11985.stdout [new file with mode: 0644]
testsuite/tests/patsyn/should_run/all.T