diff options
author | Hécate <hecate+gitlab@glitchbra.in> | 2021-01-07 22:53:12 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-27 17:40:32 -0500 |
commit | 08fba093bb0b9e186cad9e35e3f58397456c7b4a (patch) | |
tree | 630a6c9f1e42b5aa926379a39d9f4fedd1fbd137 | |
parent | 5d6009a88156ad42b387383e41a7e0707c7f06a4 (diff) | |
download | haskell-08fba093bb0b9e186cad9e35e3f58397456c7b4a.tar.gz |
Remove -XMonadFailDesugaring references
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Rename/Expr.hs | 7 | ||||
-rw-r--r-- | docs/users_guide/exts/monadfail_desugaring.rst | 23 | ||||
-rw-r--r-- | docs/users_guide/exts/syntax.rst | 1 | ||||
-rw-r--r-- | libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/driver/T4437.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_run/T3591.hs | 2 |
7 files changed, 7 insertions, 33 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 8e92fc974f..64c945a7cf 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -3647,8 +3647,6 @@ xFlagsDeps = [ flagSpec "LinearTypes" LangExt.LinearTypes, flagSpec "MagicHash" LangExt.MagicHash, flagSpec "MonadComprehensions" LangExt.MonadComprehensions, - depFlagSpec "MonadFailDesugaring" LangExt.MonadFailDesugaring - "MonadFailDesugaring is now the default behavior", flagSpec "MonoLocalBinds" LangExt.MonoLocalBinds, depFlagSpecCond "MonoPatBinds" LangExt.MonoPatBinds id diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs index bfa773ed9f..55618978a5 100644 --- a/compiler/GHC/Rename/Expr.hs +++ b/compiler/GHC/Rename/Expr.hs @@ -780,10 +780,9 @@ exhaustive list). How we deal with pattern match failure is context-dependent. entirely. So, for list comprehensions, the fail function is set to 'Nothing' for clarity. - * In the case of monadic contexts (e.g. monad comprehensions, do, and mdo - expressions) we want pattern match failure to be desugared to the appropriate - 'fail' function (either that of Monad or MonadFail, depending on whether - -XMonadFailDesugaring is enabled.) +* In the case of monadic contexts (e.g. monad comprehensions, do, and mdo + expressions) we want pattern match failure to be desugared to the + 'fail' function (from MonadFail type class). At one point we failed to make this distinction, leading to #11216. -} diff --git a/docs/users_guide/exts/monadfail_desugaring.rst b/docs/users_guide/exts/monadfail_desugaring.rst deleted file mode 100644 index 1232bf3283..0000000000 --- a/docs/users_guide/exts/monadfail_desugaring.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _monadfail-desugaring: - -New monadic failure desugaring mechanism ----------------------------------------- - -.. extension:: MonadFailDesugaring - :shortdesc: Enable monadfail desugaring. - - :since: 8.0.1 - - Use the ``MonadFail.fail`` instead of the legacy ``Monad.fail`` function - when desugaring refutable patterns in ``do`` blocks. - -The ``-XMonadFailDesugaring`` extension switches the desugaring of -``do``-blocks to use ``MonadFail.fail`` instead of ``Monad.fail``. - -This extension is enabled by default since GHC 8.6.1, under the -`MonadFail Proposal (MFP) -<https://gitlab.haskell.org/haskell/prime/-/wikis/libraries/proposals/monad-fail>`__. - -This extension is temporary, and will be deprecated in a future release. - - diff --git a/docs/users_guide/exts/syntax.rst b/docs/users_guide/exts/syntax.rst index bb29b55772..7cbc5cf198 100644 --- a/docs/users_guide/exts/syntax.rst +++ b/docs/users_guide/exts/syntax.rst @@ -14,7 +14,6 @@ Syntax parallel_list_comprehensions generalised_list_comprehensions monad_comprehensions - monadfail_desugaring overloaded_lists rebindable_syntax tuple_sections diff --git a/libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs b/libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs index b455fab533..d8478c8e39 100644 --- a/libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs +++ b/libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs @@ -138,7 +138,6 @@ data Extension | TypeApplications | Strict | StrictData - | MonadFailDesugaring | EmptyDataDeriving | NumericUnderscores | QuantifiedConstraints diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs index c83d29b03d..78d552c6cd 100644 --- a/testsuite/tests/driver/T4437.hs +++ b/testsuite/tests/driver/T4437.hs @@ -53,4 +53,6 @@ expectedCabalOnlyExtensions = ["Generics", "SafeImports", "Safe", "Unsafe", - "Trustworthy"] + "Trustworthy", + "MonadFailDesugaring" + ] diff --git a/testsuite/tests/simplCore/should_run/T3591.hs b/testsuite/tests/simplCore/should_run/T3591.hs index fc49c00cdb..09724fef62 100644 --- a/testsuite/tests/simplCore/should_run/T3591.hs +++ b/testsuite/tests/simplCore/should_run/T3591.hs @@ -20,7 +20,7 @@ -- | Module "Trampoline" defines the pipe computations and their basic building blocks. {-# LANGUAGE ScopedTypeVariables, Rank2Types, MultiParamTypeClasses, - TypeFamilies, KindSignatures, FlexibleContexts, NoMonadFailDesugaring, + TypeFamilies, KindSignatures, FlexibleContexts, FlexibleInstances, OverlappingInstances, UndecidableInstances #-} |