diff options
Diffstat (limited to 'docs/users_guide/exts/recursive_do.rst')
-rw-r--r-- | docs/users_guide/exts/recursive_do.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/users_guide/exts/recursive_do.rst b/docs/users_guide/exts/recursive_do.rst index 2f6d3e36db..a67a4bb409 100644 --- a/docs/users_guide/exts/recursive_do.rst +++ b/docs/users_guide/exts/recursive_do.rst @@ -58,9 +58,9 @@ As you can guess ``justOnes`` will evaluate to ``Just [-1,-1,-1,...``. GHC's implementation the mdo-notation closely follows the original translation as described in the paper `A recursive do for -Haskell <http://leventerkok.github.io/papers/recdo.pdf>`__, which +Haskell <https://leventerkok.github.io/papers/recdo.pdf>`__, which in turn is based on the work `Value Recursion in Monadic -Computations <http://leventerkok.github.io/papers/erkok-thesis.pdf>`__. +Computations <https://leventerkok.github.io/papers/erkok-thesis.pdf>`__. Furthermore, GHC extends the syntax described in the former paper with a lower level syntax flagged by the ``rec`` keyword, as we describe next. @@ -121,7 +121,7 @@ can be rather delicate: in particular, we would like the knots to be wrapped around as minimal groups as possible. This process is known as *segmentation*, and is described in detail in Section 3.2 of `A recursive do for -Haskell <http://leventerkok.github.io/papers/recdo.pdf>`__. +Haskell <https://leventerkok.github.io/papers/recdo.pdf>`__. Segmentation improves polymorphism and reduces the size of the recursive knot. Most importantly, it avoids unnecessary interference caused by a fundamental issue with the so-called *right-shrinking* axiom for monadic @@ -130,7 +130,7 @@ recursion. In brief, most monads of interest (IO, strict state, etc.) do performing segmentation can cause unnecessary interference, changing the termination behavior of the resulting translation. (Details can be found in Sections 3.1 and 7.2.2 of `Value Recursion in Monadic -Computations <http://leventerkok.github.io/papers/erkok-thesis.pdf>`__.) +Computations <https://leventerkok.github.io/papers/erkok-thesis.pdf>`__.) The ``mdo`` notation removes the burden of placing explicit ``rec`` blocks in the code. Unlike an ordinary ``do`` expression, in which |