Skip to content

Upstream the strictness optimisation for GHC.List's sum, product, minimum and maximum

As a follow-up from !4355 (closed), it has been noticed that the Foldable instance for List uses its own implementations, inherited from GHC.List for some of its class methods, namely sum, product, minimum, and maximum. This means the strictness optimisations that are expected as a result of the MR are circumvented and we are back to step 0.

This MR adapts the function definitions to make them match the desired behaviour regarding strictness.

Edited by Hécate Moonlight

Merge request reports