ekmett / bifunctors

Haskell 98 bifunctors, bifoldables and bitraversables
Other
57 stars 42 forks source link

Make `Biapplicative` instances for tuples lazy (backport of #96 to `5` branch) #105

Closed RyanGlScott closed 1 year ago

RyanGlScott commented 1 year ago

(This is a backport of the changes from #96 to the 5 branch, as requested in #104.)

Previously, <<*>> and biliftA2 were strict in their tuple arguments. Unfortunately, the Bifunctor instances (defined in base), are lazy in their tuple arguments. This inconsistency made tuples utterly useless for Biapplicative traversals. Make <<*>> and biliftA2 lazy for tuples.

(cherry picked from commit 309658e83af646b8b33a8f81c9d9e538a843e3b1)