Implement `-Wpartial-fields` warning (#7169)
authorDaishi Nakajima <nakaji.dayo@gmail.com>
Wed, 25 Oct 2017 19:51:01 +0000 (15:51 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 25 Oct 2017 20:44:03 +0000 (16:44 -0400)
commitf7f270eb6ba616feda79d370336db7e66f9ab79c
treefaaea23391b1304ad54ca22aacde434d79057d03
parentdf636682f3b8299268d189bfaf6de1d672c19a73
Implement `-Wpartial-fields` warning (#7169)

Warning on declaring a partial record selector.
However, disable warn with field names that start with underscore.

Test Plan: Added 1 test case.

Reviewers: austin, bgamari, simonpj

Reviewed By: bgamari, simonpj

Subscribers: goldfire, simonpj, duog, rwbarton, thomie

GHC Trac Issues: #7169

Differential Revision: https://phabricator.haskell.org/D4083
compiler/main/DynFlags.hs
compiler/typecheck/TcTyClsDecls.hs
docs/users_guide/using-warnings.rst
testsuite/tests/typecheck/should_compile/T7169.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T7169.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T