GHCi: Don't remove shadowed bindings from typechecker scope.
authormniip <mniip@mniip.com>
Sat, 1 Oct 2016 04:26:04 +0000 (00:26 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sat, 1 Oct 2016 04:27:46 +0000 (00:27 -0400)
commit59d7ee53906b9cee7f279c1f9567af7b930f8636
treeb456f80838f98a25cffaedec750933701a542bcc
parentb61b7c2462b919de7eb4c373e2e2145c6d78d04c
GHCi: Don't remove shadowed bindings from typechecker scope.

The shadowed out bindings are accessible via qualified names like
Ghci1.foo.  Since they are accessable in the renamer the typechecker
should be able to see them too.  As a consequence they show up in :show
bindings.

This fixes T11547

Test Plan:
Fixed current tests to accomodate to new stuff in :show bindings
Added a test that verifies that the typechecker doesn't crash

Reviewers: austin, bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, thomie

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

GHC Trac Issues: #11547
compiler/main/HscTypes.hs
testsuite/tests/ghci.debugger/scripts/break011.stdout
testsuite/tests/ghci.debugger/scripts/hist001.stdout
testsuite/tests/ghci/scripts/T11547.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T11547.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/T2976.stdout
testsuite/tests/ghci/scripts/all.T