summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-05-11 11:27:34 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-03 15:58:33 -0400
commitd5b89ed4d3c444e8bc4fe7cbbee38f9766574b84 (patch)
tree85810c3cabe578c1bdca32e92b9eca87bea2c116 /testsuite/tests/deSugar
parent25977ab542a30df4ae71d9699d015bcdd1ab7cfb (diff)
downloadhaskell-d5b89ed4d3c444e8bc4fe7cbbee38f9766574b84.tar.gz
Port HsToCore messages to new infrastructure
This commit converts a bunch of HsToCore (Ds) messages to use the new GHC's diagnostic message infrastructure. In particular the DsMessage type has been expanded with a lot of type constructors, each encapsulating a particular error and warning emitted during desugaring. Due to the fact that levity polymorphism checking can happen both at the Ds and at the TcRn level, a new `TcLevityCheckDsMessage` constructor has been added to the `TcRnMessage` type.
Diffstat (limited to 'testsuite/tests/deSugar')
-rw-r--r--testsuite/tests/deSugar/should_compile/T10662.stderr5
-rw-r--r--testsuite/tests/deSugar/should_compile/T3263-1.stderr6
-rw-r--r--testsuite/tests/deSugar/should_compile/T3263-2.stderr6
3 files changed, 11 insertions, 6 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T10662.stderr b/testsuite/tests/deSugar/should_compile/T10662.stderr
index 6a5cc457fc..e1f8c75c17 100644
--- a/testsuite/tests/deSugar/should_compile/T10662.stderr
+++ b/testsuite/tests/deSugar/should_compile/T10662.stderr
@@ -1,5 +1,6 @@
T10662.hs:3:3: warning: [-Wunused-do-bind (in -Wall)]
A do-notation statement discarded a result of type ‘String’
- Suppress this warning by saying
- ‘_ <- return $ let a = "hello" in a’
+ Suggested fix:
+ Suppress this warning by saying
+ ‘_ <- return $ let a = "hello" in a’
diff --git a/testsuite/tests/deSugar/should_compile/T3263-1.stderr b/testsuite/tests/deSugar/should_compile/T3263-1.stderr
index a50f8933aa..acc59ab3cd 100644
--- a/testsuite/tests/deSugar/should_compile/T3263-1.stderr
+++ b/testsuite/tests/deSugar/should_compile/T3263-1.stderr
@@ -1,8 +1,10 @@
T3263-1.hs:25:3: warning: [-Wunused-do-bind (in -Wall)]
A do-notation statement discarded a result of type ‘Int’
- Suppress this warning by saying ‘_ <- nonNullM’
+ Suggested fix:
+ Suppress this warning by saying ‘_ <- nonNullM’
T3263-1.hs:35:3: warning: [-Wunused-do-bind (in -Wall)]
A do-notation statement discarded a result of type ‘Int’
- Suppress this warning by saying ‘_ <- nonNullM’
+ Suggested fix:
+ Suppress this warning by saying ‘_ <- nonNullM’
diff --git a/testsuite/tests/deSugar/should_compile/T3263-2.stderr b/testsuite/tests/deSugar/should_compile/T3263-2.stderr
index 83de241f50..32c3bc3ad8 100644
--- a/testsuite/tests/deSugar/should_compile/T3263-2.stderr
+++ b/testsuite/tests/deSugar/should_compile/T3263-2.stderr
@@ -1,8 +1,10 @@
T3263-2.hs:25:3: warning: [-Wwrong-do-bind (in -Wdefault)]
A do-notation statement discarded a result of type ‘m Int’
- Suppress this warning by saying ‘_ <- return (return 10 :: m Int)’
+ Suggested fix:
+ Suppress this warning by saying ‘_ <- return (return 10 :: m Int)’
T3263-2.hs:37:3: warning: [-Wwrong-do-bind (in -Wdefault)]
A do-notation statement discarded a result of type ‘m Int’
- Suppress this warning by saying ‘_ <- return (return 10 :: m Int)’
+ Suggested fix:
+ Suppress this warning by saying ‘_ <- return (return 10 :: m Int)’