Tidy up rebindable syntax for MDo
authorsimonpj@microsoft.com <unknown>
Wed, 22 Dec 2010 13:22:10 +0000 (13:22 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 22 Dec 2010 13:22:10 +0000 (13:22 +0000)
commitba05282d3915e7051b3f016366b971a8506b0093
tree05d423503e37522664a2db87d9585e9fc63ed565
parent16dd51fb989fa0fe10f04da19f9724ff31838470
Tidy up rebindable syntax for MDo

For a long time an 'mdo' expression has had a SyntaxTable
attached to it.  However, we're busy deprecating SyntaxTables
in favour of rebindable syntax attached to individual Stmts,
and MDoExpr was totally inconsistent with DoExpr in this
regard.

This patch tidies it all up.  Now there's no SyntaxTable on
MDoExpr, and 'modo' is generally handled much more like 'do'.

There is resulting small change in behaviour: now MonadFix is
required only if you actually *use* recursion in mdo. This
seems consistent with the implicit dependency analysis that
is done for mdo.

Still to do:
  * Deal with #4148 (this patch is on the way)
  * Get rid of the last remaining SyntaxTable on HsCmdTop
12 files changed:
compiler/deSugar/Coverage.lhs
compiler/deSugar/DsArrows.lhs
compiler/deSugar/DsExpr.lhs
compiler/hsSyn/HsExpr.lhs
compiler/hsSyn/HsUtils.lhs
compiler/parser/Parser.y.pp
compiler/rename/RnBinds.lhs
compiler/rename/RnExpr.lhs
compiler/rename/RnExpr.lhs-boot
compiler/typecheck/TcHsSyn.lhs
compiler/typecheck/TcMatches.lhs
compiler/typecheck/TcRnDriver.lhs