[GHC] #10976: Applicative Comprehensions

GHC ghc-devs at haskell.org
Fri Oct 16 05:16:11 UTC 2015


#10976: Applicative Comprehensions
-------------------------------------+-------------------------------------
           Reporter:  davidar        |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:  8.0.1
          Component:  Compiler       |           Version:
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:  8914           |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 As discussed on `ghc-devs`, when both the `MonadComprehensions` and
 `ApplicativeDo` language extensions are enabled, it should be possible to
 use comprehension-notation (in addition to do-notation) for
 `Applicative`s. This would allow, for example, an expression like

 {{{#!hs
 (\x y -> x + 2*y) <$> ZipList [1..10] <*> ZipList [10,20..100]
 }}}

 to also be written as

 {{{#!hs
 [ x + 2*y | x <- ZipList [1..10], y <- ZipList [10,20..100] ]
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10976>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list