#5744: List layouts
------------------------------+---------------------------------------------
 Reporter:  nsch              |          Owner:  nsch            
     Type:  feature request   |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.2.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------

Comment(by nsch):

 Replying to [comment:2 ehird]:
 >   I don't like `$++`; it should be a textual keyword, like `do`.

 There have been a couple of good suggestions in those reddit comments. My
 favorites so far:

  * `cat` or `mcat` (if we use monoids instead of plain lists)
  * `be` (as in not `do`-ing anything)

 On IRC there has also been mentioned that further layouts could be thought
 of, e.g. an "application" layout which simply applies all its elements to
 the previous function:

 {{{
 foo $$
   bar a b
   baz x y

 =>

 foo (bar a b) (baz x y)
 }}}

 Or a record layout:

 {{{
 MyRecord {{
   a = 0
   b = c

 =>

 MyRecord { a = 0, b = c }
 }}}

 If you're willing to accept these (and maybe more in the future) layouts
 I'd guess the extension should be named "ExtendedLayouts" or something
 similar.

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