Narrow the warning for simplifiable constraints
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 23 Jun 2016 07:50:45 +0000 (08:50 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 23 Jun 2016 08:24:29 +0000 (09:24 +0100)
commit643706e44935cd15c2248e5345dadd3e9804688e
tree2a1d3fb3abf8d5dec78b15bc8168049738edddb3
parente556f76875a28a97dd6618b8019bc11a1cc17b02
Narrow the warning for simplifiable constraints

In Trac #11948 I added the warning
    -Wsimplifiable-class-constraints
which warns if the class constraints in a type signature are
simplifiable.

But in fact the fragility it warns about only happens with
NoMonoLocalBinds, so this patch switches off the warning if
you have MonoLocalBinds (and suggests using it in the error
message).

See Note [Simplifiable given constraints] in TcValidity.
compiler/typecheck/TcValidity.hs
testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr