#2798: Enable "rec" keyword when RecursiveDo is enabled?
------------------------------+---------------------------------------------
 Reporter:  nominolo          |          Owner:                  
     Type:  task              |         Status:  new             
 Priority:  normal            |      Milestone:                  
Component:  Compiler          |        Version:  6.11            
 Severity:  minor             |     Resolution:                  
 Keywords:                    |     Difficulty:  Unknown         
 Testcase:                    |   Architecture:  Unknown/Multiple
       Os:  Unknown/Multiple  |  
------------------------------+---------------------------------------------
Comment (by claus):

 Replying to [comment:2 simonpj]:
 > I think the reason for 'mdo' was by analogy with 'let' and 'where': just
 say "use recursion" and let the compiler sort out the details.

 I have often wanted a non-recursive 'let' as well as the current 'let
 rec'. It would get rid of many unreadable '-ed names and silly bugs. 'do',
 with non-recursive bindings by default, and recursive bindings possible,
 is slightly more pleasant in this regard (though the syntactic differences
 between pure and monadic bindings are too awkward). Unfortunately, that
 nice and simple distinction is out of reach for 'let' (too much code out
 there), but "let the compiler sort out the details" is good only if
 programmers still have control, and renaming is not the nicest way of
 exercising such control.

 >   * Remove 'mdo' and use 'do rec' instead

 Without bias to the actual choice, the name 'mdo' is unfortunate - I doubt
 it makes sense to Haskell newcomers, nor does it evoke useful semantic
 associations.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2798#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to