From f161e890dfd41fd9735f4e259fffe2ce6d00ec1a Mon Sep 17 00:00:00 2001 From: sheaf Date: Mon, 17 Jan 2022 10:45:35 +0100 Subject: Use diagnostic infrastructure in GHC.Tc.Errors --- testsuite/tests/overloadedrecflds/ghci/T19314.stdout | 18 ++++++++++-------- .../overloadedrecflds/should_fail/NFSExport.stderr | 5 +++-- .../overloadedrecflds/should_fail/NFSSuppressed.stderr | 9 +++++---- 3 files changed, 18 insertions(+), 14 deletions(-) (limited to 'testsuite/tests/overloadedrecflds') diff --git a/testsuite/tests/overloadedrecflds/ghci/T19314.stdout b/testsuite/tests/overloadedrecflds/ghci/T19314.stdout index 4e09a8a476..ed29a3d212 100644 --- a/testsuite/tests/overloadedrecflds/ghci/T19314.stdout +++ b/testsuite/tests/overloadedrecflds/ghci/T19314.stdout @@ -1,12 +1,14 @@ w :: [a] -> a x :: [a] -> a -:1:1: - • Variable not in scope: y - • NB: ‘y’ is a field selector - that has been suppressed by NoFieldSelectors +:1:1: error: + Variable not in scope: y + Suggested fix: + Notice that ‘y’ is a field selector + that has been suppressed by NoFieldSelectors. -:1:1: - • Variable not in scope: z - • NB: ‘z’ is a field selector - that has been suppressed by NoFieldSelectors +:1:1: error: + Variable not in scope: z + Suggested fix: + Notice that ‘z’ is a field selector + that has been suppressed by NoFieldSelectors. diff --git a/testsuite/tests/overloadedrecflds/should_fail/NFSExport.stderr b/testsuite/tests/overloadedrecflds/should_fail/NFSExport.stderr index c704facfc9..86631573a5 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/NFSExport.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/NFSExport.stderr @@ -1,5 +1,6 @@ NFSExport.hs:2:27: error: Not in scope: ‘foo’ - NB: ‘foo’ is a field selector belonging to the type ‘T’ - that has been suppressed by NoFieldSelectors + Suggested fix: + Notice that ‘foo’ is a field selector belonging to the type ‘T’ + that has been suppressed by NoFieldSelectors. diff --git a/testsuite/tests/overloadedrecflds/should_fail/NFSSuppressed.stderr b/testsuite/tests/overloadedrecflds/should_fail/NFSSuppressed.stderr index 51415300e0..204aee2b2b 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/NFSSuppressed.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/NFSSuppressed.stderr @@ -1,6 +1,7 @@ NFSSuppressed.hs:9:5: error: - • Variable not in scope: foo - • Perhaps you meant data constructor ‘Foo’ (line 7) - NB: ‘foo’ is a field selector belonging to the type ‘Foo’ - that has been suppressed by NoFieldSelectors + Variable not in scope: foo + Suggested fixes: + • Perhaps use data constructor ‘Foo’ (line 7) + • Notice that ‘foo’ is a field selector belonging to the type ‘Foo’ + that has been suppressed by NoFieldSelectors. -- cgit v1.2.1