wiki:RecursiveDo

Version 1 (modified by ross@…, 8 years ago) (diff)

--

Recursive Do Notation

See ExtensionDescriptionHowto for information on how to write these extension descriptions. Please add any new extensions to the list of HaskellExtensions.

Brief Explanation

An extended form of do notation allowing feedback for monads in the MonadFix class.

References

Pros

  • makes programs much more readable that the equivalent forms using mfix.

Cons

  • not backward compatible with Haskell 98, unless a different keyword is used: using a variable before it is bound is treated as recursion.
  • a dependency analysis is required to determine the semantics.