-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why do Bifunctor
and Profunctor
need to implement Functor
?
#214
Comments
I can only guess, but maybe because we wanted to make Btw, If we do so, we'll basically move another two derivations to laws #188 . |
Ah, I see. That's pretty confusing since something like |
Yeah, confusing it is. Another mismatch in Haskell vs JavaScript environments. In JS we usually think about just an Not sure what we should do with the spec, tbh. Probably remove the dependency, but I personally kinda like if spec demands that |
I would like us to have the ability to talk about these kinds of relationships. I am uncomfortable with talking about a type implementing both bifunctor and functor. I am slightly uncomfortable with the way the spec allows talking about functor instances for So I vote to remove the dependency and for us to work out a way to talk about (a) the kinds of types (b) the partial application of types. |
Is #290 a duplicate of this? |
@masaeedu I don't think so. This issue is concerned with how the spec talks
or fails to do so. There appear to be two ways in which constraints are specified in the spec which are illustrated in the Bifunctor definition.
and
In the former case, a value (not type) that implements the Bifunctor algebra is constrained to values which also implement the Functor algebra. In the latter case, a type (not a value) is defined as implementing the Bifunctor algebra if it has a I think this confusion could be eliminated if we used a class declaration-like notation
The "Type signature notation" section introduced in #223 mentions "typeclass" while discussing constraints on type variables without giving a definition. The implication is that "typeclass" is synonymous with the term "algebra" used elsewhere in the spec. |
Even better (and addressing #290) would be
|
@gabejohnson Perhaps we need a meta-spec to specify how to talk about specs like this one. ;) |
Sorry, I haven't been paying much attention to the hierarchy.
The text was updated successfully, but these errors were encountered: