Changes between Version 2 and Version 3 of RecursiveDo


Ignore:
Timestamp:
Dec 8, 2005 5:34:59 AM (8 years ago)
Author:
john@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RecursiveDo

    v2 v3  
    77 
    88An extended form of `do` notation allowing feedback for monads in the [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad-Fix.html MonadFix] class. 
     9 
     10Recursive do is invoked via the 'mdo' keyword rather than the normal 'do' one, a MonadFix constraint is added to the Monad when 'mdo' is used. Some advocate replacing 'do' with 'mdo' always. 
    911 
    1012There are connections to the proposed syntactic support for [wiki:Arrows Arrows] using an extended form of `do`-noation. In particular, the 
     
    2527 
    2628== Cons == 
     29 * a dependency analysis is required to determine the semantics. 
     30 * a lot more difficult to understand the desugaring 
     31 
     32== Cons of reusing 'do' == 
    2733 * not backward compatible with Haskell 98, unless a different keyword is used: using a variable before it is bound is treated as recursion. 
    28  * a dependency analysis is required to determine the semantics. 
     34 * shadowing variables can often be convinient 
     35 * not every monad is a MonadFix