#4370: Bring back monad comprehensions
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:  nsch        
        Type:  feature request   |       Status:  new         
    Priority:  normal            |    Milestone:  7.2.1       
   Component:  Compiler          |      Version:  6.12.3      
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by simonpj):

 I've just got rid of that `SyntaxTable` on `MDoExpr`.  As discussed above,
 it's a relic, and getting rid of it tidied up the code quite a bit.
 You'll want to pull the patch before recording yours
 {{{
 Wed Dec 22 05:22:10 PST 2010  [email protected]
   * 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

     M ./compiler/deSugar/Coverage.lhs -6 +1
     M ./compiler/deSugar/DsArrows.lhs -2 +2
     M ./compiler/deSugar/DsExpr.lhs -36 +32
     M ./compiler/hsSyn/HsExpr.lhs -12 +7
     M ./compiler/hsSyn/HsUtils.lhs -1 +1
     M ./compiler/parser/Parser.y.pp -1 +3
     M ./compiler/rename/RnBinds.lhs -1 +1
     M ./compiler/rename/RnExpr.lhs -39 +15
     M ./compiler/rename/RnExpr.lhs-boot -1 +1
     M ./compiler/typecheck/TcHsSyn.lhs -14 +4
     M ./compiler/typecheck/TcMatches.lhs -21 +7
     M ./compiler/typecheck/TcRnDriver.lhs -1 +2
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4370#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to