diff options
author | sheaf <sam.derbyshire@gmail.com> | 2023-02-21 17:09:48 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-02-23 17:00:01 -0500 |
commit | e9e7a00da2c5963a53dbcedaec793400fde07563 (patch) | |
tree | 880c590a832221fe86566b400cad7010ccca0b80 | |
parent | 8e170f86da9f804b18023a99c7c0add020a42e32 (diff) | |
download | haskell-e9e7a00da2c5963a53dbcedaec793400fde07563.tar.gz |
Explicit migration timeline for loopy SC solving
This patch updates the warning message introduced in commit
9fb4ca89bff9873e5f6a6849fa22a349c94deaae to specify an explicit
migration timeline: GHC will no longer support this constraint solving
mechanism starting from GHC 9.10.
Fixes #22912
8 files changed, 9 insertions, 9 deletions
diff --git a/compiler/GHC/Tc/Errors/Ppr.hs b/compiler/GHC/Tc/Errors/Ppr.hs index 017b29425c..a9b9718433 100644 --- a/compiler/GHC/Tc/Errors/Ppr.hs +++ b/compiler/GHC/Tc/Errors/Ppr.hs @@ -1321,7 +1321,7 @@ instance Diagnostic TcRnMessage where , nest 2 $ pprCtOrigin (ctLocOrigin wtd_loc) <> comma , text "in a way that might turn out to loop at runtime." ] warning - = vcat [ text "Future versions of GHC will turn this warning into an error." ] + = vcat [ text "Starting from GHC 9.10, this warning will turn into an error." ] user_manual = vcat [ text "See the user manual, § Undecidable instances and loopy superclasses." ] diff --git a/testsuite/tests/typecheck/should_compile/T20666b.stderr b/testsuite/tests/typecheck/should_compile/T20666b.stderr index 322c6850ea..59445bcf93 100644 --- a/testsuite/tests/typecheck/should_compile/T20666b.stderr +++ b/testsuite/tests/typecheck/should_compile/T20666b.stderr @@ -3,7 +3,7 @@ T20666b.hs:11:10: warning: [GHC-36038] [-Wloopy-superclass-solve (in -Wdefault)] I am solving the constraint ‘Eq (F [a])’, arising from the superclasses of an instance declaration, in a way that might turn out to loop at runtime. - Future versions of GHC will turn this warning into an error. + Starting from GHC 9.10, this warning will turn into an error. See the user manual, § Undecidable instances and loopy superclasses. Suggested fix: Add the constraint ‘Eq (F [a])’ to the instance context, diff --git a/testsuite/tests/typecheck/should_compile/T22891.stderr b/testsuite/tests/typecheck/should_compile/T22891.stderr index a0bdc1649b..4078683249 100644 --- a/testsuite/tests/typecheck/should_compile/T22891.stderr +++ b/testsuite/tests/typecheck/should_compile/T22891.stderr @@ -3,7 +3,7 @@ T22891.hs:9:10: warning: [GHC-36038] [-Wloopy-superclass-solve (in -Wdefault)] I am solving the constraint ‘Foo f’, arising from the superclasses of an instance declaration, in a way that might turn out to loop at runtime. - Future versions of GHC will turn this warning into an error. + Starting from GHC 9.10, this warning will turn into an error. See the user manual, § Undecidable instances and loopy superclasses. Suggested fix: Add the constraint ‘Foo f’ to the instance context, diff --git a/testsuite/tests/typecheck/should_compile/T22912.stderr b/testsuite/tests/typecheck/should_compile/T22912.stderr index b53614baff..852a1b6896 100644 --- a/testsuite/tests/typecheck/should_compile/T22912.stderr +++ b/testsuite/tests/typecheck/should_compile/T22912.stderr @@ -4,7 +4,7 @@ T22912.hs:17:16: warning: [GHC-36038] [-Wloopy-superclass-solve (in -Wdefault)] arising from the head of a quantified constraint arising from a use of ‘go’, in a way that might turn out to loop at runtime. - Future versions of GHC will turn this warning into an error. + Starting from GHC 9.10, this warning will turn into an error. See the user manual, § Undecidable instances and loopy superclasses. Suggested fix: Add the constraint ‘Implies diff --git a/testsuite/tests/typecheck/should_fail/T20666.stderr b/testsuite/tests/typecheck/should_fail/T20666.stderr index 46d0fafcc4..63a0d11c07 100644 --- a/testsuite/tests/typecheck/should_fail/T20666.stderr +++ b/testsuite/tests/typecheck/should_fail/T20666.stderr @@ -3,7 +3,7 @@ T20666.hs:13:10: warning: [GHC-36038] [-Wloopy-superclass-solve (in -Wdefault)] I am solving the constraint ‘Show (T c)’, arising from the superclasses of an instance declaration, in a way that might turn out to loop at runtime. - Future versions of GHC will turn this warning into an error. + Starting from GHC 9.10, this warning will turn into an error. See the user manual, § Undecidable instances and loopy superclasses. Suggested fix: Add the constraint ‘Show (T c)’ to the instance context, @@ -13,7 +13,7 @@ T20666.hs:17:10: warning: [GHC-36038] [-Wloopy-superclass-solve (in -Wdefault)] I am solving the constraint ‘Show (T c)’, arising from the superclasses of an instance declaration, in a way that might turn out to loop at runtime. - Future versions of GHC will turn this warning into an error. + Starting from GHC 9.10, this warning will turn into an error. See the user manual, § Undecidable instances and loopy superclasses. Suggested fix: Add the constraint ‘Show (T c)’ to the instance context, diff --git a/testsuite/tests/typecheck/should_fail/T20666a.stderr b/testsuite/tests/typecheck/should_fail/T20666a.stderr index bed585dcd2..c4b3022949 100644 --- a/testsuite/tests/typecheck/should_fail/T20666a.stderr +++ b/testsuite/tests/typecheck/should_fail/T20666a.stderr @@ -3,7 +3,7 @@ T20666a.hs:11:10: warning: [GHC-36038] [-Wloopy-superclass-solve (in -Wdefault)] I am solving the constraint ‘Eq (F [a])’, arising from the superclasses of an instance declaration, in a way that might turn out to loop at runtime. - Future versions of GHC will turn this warning into an error. + Starting from GHC 9.10, this warning will turn into an error. See the user manual, § Undecidable instances and loopy superclasses. Suggested fix: Add the constraint ‘Eq (F [a])’ to the instance context, diff --git a/testsuite/tests/typecheck/should_fail/T6161.stderr b/testsuite/tests/typecheck/should_fail/T6161.stderr index c1daab09df..f9a9a9e1e1 100644 --- a/testsuite/tests/typecheck/should_fail/T6161.stderr +++ b/testsuite/tests/typecheck/should_fail/T6161.stderr @@ -3,7 +3,7 @@ T6161.hs:19:10: warning: [GHC-36038] [-Wloopy-superclass-solve (in -Wdefault)] I am solving the constraint ‘Super (Fam a)’, arising from the superclasses of an instance declaration, in a way that might turn out to loop at runtime. - Future versions of GHC will turn this warning into an error. + Starting from GHC 9.10, this warning will turn into an error. See the user manual, § Undecidable instances and loopy superclasses. Suggested fix: Add the constraint ‘Super (Fam a)’ to the instance context, diff --git a/testsuite/tests/typecheck/should_fail/tcfail223.stderr b/testsuite/tests/typecheck/should_fail/tcfail223.stderr index 8201c8839f..2ccfd00dda 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail223.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail223.stderr @@ -3,7 +3,7 @@ tcfail223.hs:10:10: warning: [GHC-36038] [-Wloopy-superclass-solve (in -Wdefault I am solving the constraint ‘Class1 a’, arising from the superclasses of an instance declaration, in a way that might turn out to loop at runtime. - Future versions of GHC will turn this warning into an error. + Starting from GHC 9.10, this warning will turn into an error. See the user manual, § Undecidable instances and loopy superclasses. Suggested fix: Add the constraint ‘Class1 a’ to the instance context, |