From aab8656ba0561e56048a1222c396d2d117aca5a7 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Mon, 6 Aug 2018 12:53:06 -0400 Subject: 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 --- testsuite/tests/rebindable/rebindable1.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testsuite/tests/rebindable') diff --git a/testsuite/tests/rebindable/rebindable1.hs b/testsuite/tests/rebindable/rebindable1.hs index 8fcc5d2697..fcbe52fbc1 100644 --- a/testsuite/tests/rebindable/rebindable1.hs +++ b/testsuite/tests/rebindable/rebindable1.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -Wno-missing-monadfail-instances #-} -{-# LANGUAGE RebindableSyntax, NPlusKPatterns #-} +{-# LANGUAGE RebindableSyntax, NPlusKPatterns, NoMonadFailDesugaring #-} module RebindableCase1 where { -- cgit v1.2.1