[GHC] #9781: Make list monad operations fuse

GHC ghc-devs at haskell.org
Fri Nov 7 16:41:37 UTC 2014


#9781: Make list monad operations fuse
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:  dfeuer
                  Type:  task        |           Status:  new
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Core        |          Version:  7.9
  Libraries                          |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  Runtime     |  Related Tickets:
  performance bug                    |
             Test Case:              |
              Blocking:              |
Differential Revisions:  Phab:D455   |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:1 ekmett]:
 > I have no issues with improving fusion for do sugared lists, the
 question is if it is possible to achieve this change with just a libraries
 fix or if you need to go into the compiler.
 >
 > There is a lot of crazy code down in the list comprehension module that
 gets used to make lists fast there. It isn't clear to me how we'd lean on
 it.

 The easy way is to ''use'' the list comprehension desugaring, as in the
 linked code review. The hard way (because it makes us hide it in some
 imports) is to move `concatMap` from `GHC.List` into `GHC.Base` and use
 `xs >>= f = concatMap f xs`, etc.

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


More information about the ghc-tickets mailing list