#4148: improve new recursive do syntax
---------------------------------+------------------------------------------
    Reporter:  guest             |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  low               |   Milestone:  7.6.1           
   Component:  Compiler          |     Version:  6.12.3          
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonpj):

 * cc: ryani (added)
  * difficulty:  => Unknown


Comment:

 I believe that both Iavor and Ross advocate:
  * Revive the `mdo` keyword (enabled by `RecursiveDo`)
  * Make `mdo` perform dependency analysis / segmentation
  * Keep the `rec` keyword (enabled by `DoRec`)
  * Cease doing dependency analysis / segmentation for `rec`

 So `mdo` is clever and does the segmenting stuff, but `rec` says "do
 exactly what I say" which gives precise control if you need it.

 To me that seems simple, predictable, and makes everyone happy.  I suppose
 that if we ''stop'' doing segmentation for `rec` some programs might
 change behaviour, but I bet they are very few.  (Opinions, Ross, Iavor?)

 It seems a bit overkill to have two language flags for what is really one
 feature.  An alternative would be to make them synonymous for now, and
 deprecate `DoRec` in favour of `RecursiveDo`.

 Opinions? As Iavor says this is not a big deal. But presumably Ryan had a
 reason for raising it.

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4148#comment:12>
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