Add fusion rules for the zipWith functions in base (#15263)
authorTobias Decking <Tobias.Decking@gmail.com>
Thu, 6 Dec 2018 20:32:18 +0000 (15:32 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 6 Dec 2018 20:33:06 +0000 (15:33 -0500)
commitfb669f51b3f2cae79511ac3d1c43939d951b1f69
treec131f28650d54ce012d789955718845148b9da20
parent1ef90f990da90036d481c830d8832e21b8f1571b
Add fusion rules for the zipWith functions in base (#15263)

This patch will allow `zip3` and `zipWith3` in `GHC.List` as well
as `zipWith4`, `zipWith5`, `zipWith6` and `zipWith7` in `Data.OldList` to fuse.

These rules are kept in a similar style as the rules for `zip` and `zipWith`.

Added a corresponding test case.

Test Plan: validate

Reviewers: hvr, bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rockbmb, rwbarton, carter

GHC Trac Issues: #15263

Differential Revision: https://phabricator.haskell.org/D5241
docs/users_guide/8.8.1-notes.rst
libraries/base/Data/OldList.hs
libraries/base/GHC/List.hs
testsuite/tests/perf/should_run/T15263.hs [new file with mode: 0644]
testsuite/tests/perf/should_run/T15263.stdout [new file with mode: 0644]
testsuite/tests/perf/should_run/all.T