Require that Profunctor implement the Contravariant spec#252
Require that Profunctor implement the Contravariant spec#252gabejohnson wants to merge 1 commit intofantasyland:masterfrom
Conversation
|
I realize the graph looks funky now. I'll try to fix that. |
|
This sounds completely reasonable to me. I'll defer to those with better understandings. :) |
|
@davidchambers I'm no longer sure that this is valid. I think (based on a comment by @puffnfresh on Gitter) that this reasoning works for Bifunctor and Profunctor WRT Functor because fixing the first argument results in a type that has a functor. Now this isn't the case with Profunctor because it would be required to fix the second argument. Though honestly my type foo isn't sufficient to be certain. |
|
It doesn't lead to inconsistency (though it breaks type inference), to allow type level lambdas like |
|
What's the status of this pull request, @gabejohnson? |
Values which implement Bifunctor or Profunctor must also implement Functor.
Profunctor is covariant in the second argument and Bifunctor in both.
Since Profunctor is contravariant in the first argument, shouldn't a value implementing it also be required to implement Contravariant?