[GHC] #9781: Make list monad operations fuse

GHC ghc-devs at haskell.org
Tue Nov 11 07:22:34 UTC 2014


#9781: Make list monad operations fuse
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:  dfeuer
                  Type:  task        |           Status:  patch
              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 Herbert Valerio Riedel <hvr@…>):

 In [changeset:"4923cea56345060faaf77e4c475eac6aa3c77506/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="4923cea56345060faaf77e4c475eac6aa3c77506"
 Define list monad operations using comprehensions

 Define list monad operations using list comprehensions. Code using monad
 operations with lists did not fuse fully. Writing list code with `do`
 notation or `(>>=)` and `(>>)` operations could allocate more than
 equivalent code using list comprehensions.

 Define `mapM` directly, instead of using `sequence` and `map`. This
 leads to substantially less allocation in `cryptarithm2`.

 Addresses #9781

 Reviewed By: ekmett, nomeata

 Differential Revision: https://phabricator.haskell.org/D455
 }}}

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


More information about the ghc-tickets mailing list