summaryrefslogtreecommitdiff
path: root/testsuite/tests/monadfail
diff options
context:
space:
mode:
authorMichael Walker <mike@barrucadu.co.uk>2016-02-25 17:34:07 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2016-02-25 23:44:08 +0100
commitbb5afd3c274011c5ea302210b4c290ec1f83209c (patch)
treeb6c2000e466e894207ce28dc65346853120f8548 /testsuite/tests/monadfail
parent1badf157be3b7f604ba1ac64d2ea044d783e6e50 (diff)
downloadhaskell-bb5afd3c274011c5ea302210b4c290ec1f83209c.tar.gz
Print which warning-flag controls an emitted warning
Both gcc and clang tell which warning flag a reported warning can be controlled with, this patch makes ghc do the same. More generally, this allows for annotated compiler output, where an optional annotation is displayed in brackets after the severity. This also adds a new flag `-f(no-)show-warning-groups` to control whether to show which warning-group (such as `-Wall` or `-Wcompat`) a warning belongs to. This flag is on by default. This implements #10752 Reviewed By: quchen, bgamari, hvr Differential Revision: https://phabricator.haskell.org/D1943
Diffstat (limited to 'testsuite/tests/monadfail')
-rw-r--r--testsuite/tests/monadfail/MonadFailWarnings.stderr8
-rw-r--r--testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr2
2 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/tests/monadfail/MonadFailWarnings.stderr b/testsuite/tests/monadfail/MonadFailWarnings.stderr
index af2606a392..544f14aeb4 100644
--- a/testsuite/tests/monadfail/MonadFailWarnings.stderr
+++ b/testsuite/tests/monadfail/MonadFailWarnings.stderr
@@ -1,5 +1,5 @@
-MonadFailWarnings.hs:19:5: warning:
+MonadFailWarnings.hs:19:5: warning: [-Wmissing-monadfail-instances (in -Wcompat)]
• Could not deduce (MonadFail m)
arising from the failable pattern ‘Just x’
(this will become an error in a future GHC release)
@@ -20,7 +20,7 @@ MonadFailWarnings.hs:19:5: warning:
= do { Just x <- undefined;
undefined }
-MonadFailWarnings.hs:35:5: warning:
+MonadFailWarnings.hs:35:5: warning: [-Wmissing-monadfail-instances (in -Wcompat)]
• No instance for (MonadFail Identity)
arising from the failable pattern ‘Just x’
(this will become an error in a future GHC release)
@@ -33,7 +33,7 @@ MonadFailWarnings.hs:35:5: warning:
= do { Just x <- undefined;
undefined }
-MonadFailWarnings.hs:51:5: warning:
+MonadFailWarnings.hs:51:5: warning: [-Wmissing-monadfail-instances (in -Wcompat)]
• No instance for (MonadFail (ST s))
arising from the failable pattern ‘Just x’
(this will become an error in a future GHC release)
@@ -46,7 +46,7 @@ MonadFailWarnings.hs:51:5: warning:
= do { Just x <- undefined;
undefined }
-MonadFailWarnings.hs:59:5: warning:
+MonadFailWarnings.hs:59:5: warning: [-Wmissing-monadfail-instances (in -Wcompat)]
• No instance for (MonadFail ((->) r))
arising from the failable pattern ‘Just x’
(this will become an error in a future GHC release)
diff --git a/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr b/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr
index 9610f8971f..7b6cd1ba6d 100644
--- a/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr
+++ b/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr
@@ -1,5 +1,5 @@
-MonadFailWarningsWithRebindableSyntax.hs:13:5: warning:
+MonadFailWarningsWithRebindableSyntax.hs:13:5: warning: [-Wmissing-monadfail-instances (in -Wcompat)]
The failable pattern ‘Just x’
is used together with -XRebindableSyntax. If this is intentional,
compile with -Wno-missing-monadfail-instances.