Closed RyanGlScott closed 4 years ago
I've done a second generation of this pass in preparation for v6. Now that they are essentially identical, due to adopting the Functor superclass for profunctor, I'm considering removing Cayley outright, or just making it a type synonym.
Either of those sound fine to me. If you're going to break things, you might as well break them consistently :)
Cayley
:https://github.com/ekmett/profunctors/blob/854e957b353da3a23c9150a865ec2083cc8cf462/src/Data/Profunctor/Cayley.hs#L27
is very similar to
Tannen
from thebifunctors
library. As far as I can tell, the main differences between them are thatCayley
lifts aFunctor
/Monad
/Comonad
into aProfunctorFunctor
/ProfunctorMonad
/ProfunctorComonad
, whileTannen
lifts aFunctor
into aBifunctorFunctor
/BifunctorMonad
/BifunctorComonad
. Aside from that, each type has a number of "pass-through" instances.Curiously,
Cayley
andTannen
do not define the same pass-through instances, despite their similarities. I went through the code recently and tallied up the number of discrepancies:instances that
Cayley
has butTannen
does notMapping
Traversing
instances that
Tannen
has butCayley
does notCochoice
Costrong
Anything else I'm forgetting?
We should add these instances to the respective types for parity with each other.