[Proposal] Strict `sum` and `product`

Henning Thielemann lemming at henning-thielemann.de
Sun Oct 18 19:24:53 UTC 2020


On Sun, 18 Oct 2020, H├ęcate wrote:

> In conclusion, leaving things to the optimiser that could be trivially 
> made fast every time seems needlessly risky.

`seq` is still a hack. A strict 'sum' and 'product' would still fail on a 
lazy accumulator type, say a lazy pair type. If at all, sum and product 
should be deepseq-strict. So currently, letting the optimiser make a lazy 
sum strict is still the smaller hack.


More information about the Libraries mailing list