summaryrefslogtreecommitdiff
path: root/testsuite/tests/wcompat-warnings
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2018-08-06 12:53:06 -0400
committerBen Gamari <ben@smart-cactus.org>2018-08-07 15:56:53 -0400
commitaab8656ba0561e56048a1222c396d2d117aca5a7 (patch)
tree8d14345e7f042ba5700b4275950e44dcc0ca1be9 /testsuite/tests/wcompat-warnings
parentf22baa424aed66cd75ea05d4db7efdcd0e021217 (diff)
downloadhaskell-aab8656ba0561e56048a1222c396d2d117aca5a7.tar.gz
Turn on MonadFail desugaring by default
Summary: This contains two commits: ---- Make GHC's code-base compatible w/ `MonadFail` There were a couple of use-sites which implicitly used pattern-matches in `do`-notation even though the underlying `Monad` didn't explicitly support `fail` This refactoring turns those use-sites into explicit case discrimations and adds an `MonadFail` instance for `UniqSM` (`UniqSM` was the worst offender so this has been postponed for a follow-up refactoring) --- Turn on MonadFail desugaring by default This finally implements the phase scheduled for GHC 8.6 according to https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail#Transitionalstrategy This also preserves some tests that assumed MonadFail desugaring to be active; all ghc boot libs were already made compatible with this `MonadFail` long ago, so no changes were needed there. Test Plan: Locally performed ./validate --fast Reviewers: bgamari, simonmar, jrtc27, RyanGlScott Reviewed By: bgamari Subscribers: bgamari, RyanGlScott, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D5028
Diffstat (limited to 'testsuite/tests/wcompat-warnings')
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsNotOn.hs2
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsOff.hs2
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs2
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs2
4 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsNotOn.hs b/testsuite/tests/wcompat-warnings/WCompatWarningsNotOn.hs
index 707e153a8d..a26c565b03 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsNotOn.hs
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsNotOn.hs
@@ -1,6 +1,6 @@
-- Test purpose:
-- Ensure that not using -Wcompat does not enable its warnings
-
+{-# LANGUAGE NoMonadFailDesugaring #-}
-- {-# OPTIONS_GHC -Wcompat #-}
-- {-# OPTIONS_GHC -Wno-compat #-}
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOff.hs b/testsuite/tests/wcompat-warnings/WCompatWarningsOff.hs
index 777c11cd70..33c26ccbc1 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsOff.hs
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOff.hs
@@ -1,6 +1,6 @@
-- Test purpose:
-- Ensure that using -Wno-compat does not switch on warnings
-
+{-# LANGUAGE NoMonadFailDesugaring #-}
-- {-# OPTIONS_GHC -Wcompat #-}
{-# OPTIONS_GHC -Wno-compat #-}
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
index 6d67ed039f..7d9e7de4fa 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
@@ -1,6 +1,6 @@
-- Test purpose:
-- Ensure that -Wcompat switches on the right warnings
-
+{-# LANGUAGE NoMonadFailDesugaring #-}
{-# OPTIONS_GHC -Wcompat #-}
-- {-# OPTIONS_GHC -Wno-compat #-}
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs b/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs
index e6a4aa3efb..81df7577e2 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs
@@ -1,6 +1,6 @@
-- Test purpose:
-- Ensure that -Wno-compat disables a previously set -Wcompat
-
+{-# LANGUAGE NoMonadFailDesugaring #-}
{-# OPTIONS_GHC -Wcompat #-}
{-# OPTIONS_GHC -Wno-compat #-}