Relevant Bindings no longer reports shadowed bindings (fixes #12176)
authorAnnie Cherkaev <annie.cherk@gmail.com>
Mon, 1 Aug 2016 06:30:42 +0000 (23:30 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Mon, 1 Aug 2016 08:36:05 +0000 (01:36 -0700)
commit89ae1e858f6eed42cebd9af01b30e239d4543faf
tree3cf160759f1a4c41ff1e7ff50a5b186f6e301934
parentc06e3f46d24ef69f3a3d794f5f604cb8c2a40cbc
Relevant Bindings no longer reports shadowed bindings (fixes #12176)

Summary: Modified the RelevantBindings method in TcErrors.hs to only search over
non-shadowed bindings.

Test Plan: Wrote 2 simple test cases, verified that it worked with multiple
shadowed bindings, and also non-shadowed bindings.

Reviewers: austin, bgamari, ezyang

Reviewed By: ezyang

Subscribers: ezyang, thomie

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

GHC Trac Issues: #12177
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcRnTypes.hs
testsuite/tests/typecheck/should_fail/T12177.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12177.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T