#3380: [Patch] Support implicit concatenation in list comprehensions
------------------------------+---------------------------------------------
 Reporter:  batterseapower    |          Owner:                  
     Type:  feature request   |         Status:  new             
 Priority:  normal            |      Milestone:                  
Component:  Compiler          |        Version:  6.10.4          
 Severity:  normal            |     Resolution:                  
 Keywords:                    |       Testcase:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by batterseapower):

 Yes, though the code generated by this patch may be /slightly/ better than
 for your version if you have RULES or foldr/buildable list literals turned
 off. The "killer app" that made me implement this was to support the
 following idiom:

 {{{
 system "foo" $
   ["foo" | fooing_enabled] ++
   ["bar" | baring_enabled]
 }}}

 If you want to turn on two options when baring_enabled is on then you can
 now write:

 {{{
 system "foo" $
   ["foo" | fooing_enabled] ++
   ["bar1", "bar2" | baring_enabled]
 }}}

 Which seems quite slick. It's a rather nice interpretation of some
 otherwise unused syntax IMHO.

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