diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-04-06 12:27:43 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-04-06 12:34:01 +0100 |
commit | 65b185d4886b4efa3efe3cc5ecc8dd6e07d89afe (patch) | |
tree | c8aa39e9fd28f8b4545b4df198d31627b1447edc /testsuite/tests/partial-sigs | |
parent | 2ab7f626b94a5da4b544e01072219a95cd588202 (diff) | |
download | haskell-65b185d4886b4efa3efe3cc5ecc8dd6e07d89afe.tar.gz |
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.
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r-- | testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr index 9f0ea1fb72..ca06301eb5 100644 --- a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr +++ b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr @@ -7,7 +7,9 @@ Dependent packages: [base-4.10.0.0, ghc-prim-0.5.0.0, integer-gmp-1.0.0.1] SomethingShowable.hs:5:1: warning: [-Wsimplifiable-class-constraints (in -Wdefault)] - The constraint ‘Show Bool’ matches an instance declaration - instance Show Bool -- Defined in ‘GHC.Show’ - This makes type inference for inner bindings fragile; - either use MonoLocalBinds, or simplify it using the instance + • The constraint ‘Show Bool’ matches an instance declaration + instance Show Bool -- Defined in ‘GHC.Show’ + This makes type inference for inner bindings fragile; + either use MonoLocalBinds, or simplify it using the instance + • When checking the inferred type + somethingShowable :: Show Bool => Bool -> String |