From: Simon Peyton Jones Date: Wed, 4 May 2011 15:37:08 +0000 (+0100) Subject: Merge branch monad-comp onto master X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=7028041739973c3dc17b23a98c65c892f41f0647 Merge branch monad-comp onto master This patch implements monad comprehensions, Trac #4370. Thanks to Nils Schweinsberg for doing most of the heavy lifting. I did quite a lot of related refactoring as well. Notably: * Combined TransformStmt and GroupStmt into a single constructor TransStmt; they share a lot of code. I also made TransStmt into a record; it has a lot of fields. * Remove the "result expression" field of HsDo, and instead implement LastStmt, which is expected to be at the end of a list of Stmts * Generalise and tidy up the typechecking of monad comprehensions * Do-notation in arrows is marked with HsStmtContext = ArrowExpr * tcMDoStmt (which was only used for arrows) is moved to TcArrows, and renamed tcArrDoStmt * Improved documentation in the user manual * Lots of other minor changes --- 7028041739973c3dc17b23a98c65c892f41f0647