Closed rehno-lindeque closed 9 years ago
It's not strictly more general: it confines us to the ->
Category, and generalizes from tuples to any Bifunctor. I tend to agree with you that people are more likely to want to generalize their Bifunctors than their Category
s, so I think I like this change.
@gregwebs How do you feel?
+1. I also prefer the easy to remember bitmap and I would like to only export the fanout operator from Arrow.
Oops, I meant bimap.
OK, let's go for it. I'd say just re-export the entire Bifunctor
typeclass. This will require a major version bump since it is a breaking change.
Do either of you have particular goals for how this should look? If so, please commit/pull request them. If not, I'll just commit the "obvious" implementation.
For our prelude I've simply re-exported Data.Bifunctor
since it only has those three functions exposed in that module.
Alright, cdf041f should address this. Comments before I release?
looks good!
I've released 0.10 to Hackage.
:+1:
Currently classy-prelude uses
first
andsecond
fromControl.Arrow
. I thinkfirst
andsecond
fromData.Bifunctor
is more general though (e.g. I occasionally use it onEither
types)e.g.
Not sure, but I think I also read somewhere that there were some arguments for
Data.Bifunctor
being included in base?