Make accumArray and accum stricter
authorDavid Feuer <david.feuer@gmail.com>
Mon, 5 Mar 2018 20:18:05 +0000 (15:18 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 6 Mar 2018 18:03:06 +0000 (13:03 -0500)
commit08345bd0e8d237ec3929aaee7613c4f76e07e131
treed2661c6d33bce1d23210ff07f14270fe3da5c197
parent64c0af7517148316b259300b851b966cfbcf3eaf
Make accumArray and accum stricter

`accumArray` was lazier than documented. `accum` did not have
documented strictness. The extra laziness allowed thunks to build
up in the array. Force the results of applying the accumulating
function to resolve.

Reviewers: hvr, bgamari

Reviewed By: bgamari

Subscribers: alpmestan, rwbarton, thomie, carter

GHC Trac Issues: #14785

Differential Revision: https://phabricator.haskell.org/D4403
libraries/base/GHC/Arr.hs