Changes between Version 4 and Version 5 of RecursiveDo


Ignore:
Timestamp:
Dec 9, 2005 6:59:51 AM (8 years ago)
Author:
ravi@…
Comment:

Suggest choosing a new keyword for mdo

Legend:

Unmodified
Added
Removed
Modified
  • RecursiveDo

    v4 v5  
    2626That is, a variable used before it is bound is treated as recursively defined, while in a Haskell 98 `do`-statement it would be treated as shadowed. 
    2727 
    28 To retain backwards compatibility, existing implementations use a different keyword (`mdo`) for expressions treated in this way, and always add a `MonadFix` constraint to these expressions. 
     28To retain backwards compatibility, existing implementations use a different keyword (`mdo`) for expressions treated in this way, and always add a `MonadFix` constraint to these expressions. If the keyword `mdo` is not suggestive enough (see below) a new keyword (`recdo`?) could be chosen. 
    2929An alternative is to extend the ordinary `do`-notation, sacrificing backwards compatibility. 
    3030In that case, the `MonadFix` constraint would be added only if a recursive binding was present.