Re: Libraries Digest, Vol 128, Issue 72

On 2014-04-21 at 22:01:34 +0200, Jo?o Crist?v?o wrote:
Proposal 1: ---------------- Add no new code, but document Data.Either to mention how to use `left` and (+++) from Control.Arrow
+1, I'd also like if Data.Either reexported those functions. Then, the documentation could just give some more specific type signatures that show how to use them (like the lens library does in many cases).
Proposal 2: ---------------- Document Control.Arrow to exemplify the (->) instance usage.
+1
Proposal 3:
----------------
Implement mapLeft in Data.Either
3a) ... as (a -> b) -> Either a c -> Either b c (so that is easy to follow) 3b) ... as Control.Arrow.left 3c) ... and also redefine the -> instance of Control.Arrow.left as mapLeft
-1, just export left from Data.Either and give it a more specific type signature in the documentation.
Proposal 4: ----------------
Implement mapBoth in Data.Either
4a) ... as (a -> b) -> (c -> d) -> Either a c -> Either b d (so that is easy to follow) 4b) ... as Control.Arrow.(+++) 4c) ... and also redefine the -> instance of Control.Arrow.(+++) as mapBoth
-1, same reason as 3 (using +++)
Proposal 5: ----------------
== Proposal 4, using the mapEither name instead.
-1
Proposal 6: ----------------
Implement mapRight in Data.Either
6a) ... as (b -> c) -> Either a b -> Either a c 6b) ... as fmap
-1, fmap is already in Prelude and well-known
Proposal 7: ----------------
Don't implement mapRight, but include documentation in Data.Either stating that it is just fmap.
+1
Proposal 8: ----------------
Bring bifunctors to base.
+1
participants (1)
-
Benno Fünfstück