Closed treeowl closed 3 years ago
Question: should Stricter
and Lazier
have Bifoldable
, Foldable
, Bitraversable
, and/or Traversable
instances? The Foldable
and Bifoldable
ones are trivial, albeit verbose. What about traversals? It's much less obvious to me what those are supposed to look like.
Another question: If base
adds a Functor
constraint to Bifunctor
, will it harmonize the Functor
and Bifunctor
instances, or are those doomed to be forever mismatched?
Oh, I guess the traversals are dead simple too, but I'm not sure we really want them. Any thoughts?
Hmm... Not sure why this is struggling to build. But I'm thinking maybe most of this PR doesn't belong in this package.
Previously,
<<*>>
andbiliftA2
were strict in their tuple arguments. Unfortunately, theBifunctor
instances (defined inbase
), are lazy in their tuple arguments. This inconsistency made tuples utterly useless forBiapplicative
traversals. Make<<*>>
andbiliftA2
lazy for tuples.Add
Stricter
andLazier
newtype wrappers.Stricter
produces strictFunctor
,Applicative
,Bifunctor
, andBiapplicative
instances from (possibly) lazy ones.Lazier
produces lazy instances from (possibly) strict ones for product types, usingGHC.Generics
.