diff options
Diffstat (limited to 'docs/users_guide')
-rw-r--r-- | docs/users_guide/glasgow_exts.rst | 16 | ||||
-rw-r--r-- | docs/users_guide/using-warnings.rst | 20 |
2 files changed, 31 insertions, 5 deletions
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index ed47dae6a0..70879b12e8 100644 --- a/docs/users_guide/glasgow_exts.rst +++ b/docs/users_guide/glasgow_exts.rst @@ -1681,6 +1681,22 @@ In the case of transform comprehensions, notice that the groups are parameterised over some arbitrary type ``n`` (provided it has an ``fmap``, as well as the comprehension being over an arbitrary monad. +.. _monadfail-desugaring + +New monadic failure desugaring mechanism +---------------------------------------- + +.. index:: + single: -XMonadFailDesugaring option + +Switch desugaring of ``do``-blocks to use ``MonadFail.fail`` instead of +``Monad.fail``. This will be the default behaviour in a future GHC release, +under the MonadFail Proposal (MFP). + +This extension is temporary, and will be deprecated in a future release. It is +included so that library authors have a hard check for whether their code +will work with future GHC versions. + .. _rebindable-syntax: Rebindable syntax and the implicit Prelude import diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index c3271d0111..8cf329cdc7 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -188,12 +188,22 @@ command line. single: AMP single: Applicative-Monad Proposal - Causes a warning to be emitted when a definition is in conflict with - the AMP (Applicative-Monad proosal), namely: 1. Instance of Monad - without Applicative; 2. Instance of MonadPlus without Alternative; - 3. Custom definitions of join/pure/<\*> + This option is deprecated. - This option is on by default. + Caused a warning to be emitted when a definition was in conflict with + the AMP (Applicative-Monad proosal). + +``-fwarn-missing-monadfail-instance`` + .. index:: + single: -fwarn-missing-monadfail-instance + single: MFP + single: MonadFail Proposal + + Warn when a failable pattern is used in a do-block that does not have a + ``MonadFail`` instance. + + This option is off by default, but will be switched on in a future GHC + release, as part of the MFP (MonadFail Proposal). ``-fwarn-deprecated-flags`` .. index:: |