Be less aggressive about fragile-context warrnings
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 6 Apr 2017 11:27:43 +0000 (12:27 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 6 Apr 2017 11:34:01 +0000 (12:34 +0100)
commit65b185d4886b4efa3efe3cc5ecc8dd6e07d89afe
treec8aa39e9fd28f8b4545b4df198d31627b1447edc
parent2ab7f626b94a5da4b544e01072219a95cd588202
Be less aggressive about fragile-context warrnings

In the implementation of WarnSimplifiableClassConstraints, be
less aggressive about reporting a problem. We were complaining
about a "fragile" case that in fact was not fragile.

See Note [Simplifiable given constraints] in TcValidity.

This fixes Trac #13526.
compiler/typecheck/TcValidity.hs
testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr
testsuite/tests/typecheck/should_compile/T13526.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T13526.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T