Open Icelandjack opened 1 year ago
Functor (WrappedBifunctor p a)
can probably be reduced to a forall a. Functor (p a)
constraint as well since second = fmap
.
instance Bifunctor p => Functor (WrappedBifunctor p a) where
fmap f = WrapBifunctor . second f . unwrapBifunctor
For the change of adding a superclass to
Bifunctor
, and later toBifoldable
andBitraversable
we needFunctor
instances ofData.Bifunctor.Product
and others. I tried it out and it seems enough to doderiving stock Functor
.
That change was already done on the main branch, which contains the unreleased major version 6 of bifunctors https://github.com/ekmett/bifunctors/blob/4f1535a2c94788c9e6d9accfca8c58ef497628c5/src/Data/Bifunctor/Product.hs#L43
The Functor
instance of WrappedBifunctor
currently looks like this:
https://github.com/ekmett/bifunctors/blob/4f1535a2c94788c9e6d9accfca8c58ef497628c5/src/Data/Bifunctor/Wrapped.hs#L107
For the change of adding a superclass to
Bifunctor
, and later toBifoldable
andBitraversable
we need
Functor
instances ofData.Bifunctor.Product
and others. I tried it out and it seems enough to doderiving stock Functor
.