[GHC] #15263: Fuse zipWith3

GHC ghc-devs at haskell.org
Mon Jun 11 20:45:22 UTC 2018


#15263: Fuse zipWith3
-------------------------------------+-------------------------------------
           Reporter:  goldfire       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.4.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I was surprised to discover that `zipWith3` has no `RULES` associated with
 it to aid fusion.

 Can we add these?

 I have no idea what I'm doing, but would this substitution work:

 {{{
 {-# RULES "zipWith3"
 zipWith3 f a b c = zipWith id (zipWith f a b) c
 #-}
 }}}

 Those who know what they're doing will likely devise a better strategy.

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


More information about the ghc-tickets mailing list