rfc: Additions to Data.Either (take 2)
Nathan Bouscal
nbouscal at gmail.com
Mon Apr 21 20:06:02 UTC 2014
+1 on proposals 2, 7, and 8. Mostly indifferent on the others.
On Mon, Apr 21, 2014 at 4:01 PM, João Cristóvão <jmacristovao at gmail.com>wrote:
> Hello,
>
> So following Carter Schonwald suggestion of creating a new thread, but
> not literally, since the amount of combinations would be huge, here is my
> own humble attempt to gather all hypothesis discussed into separate
> proposals, for your voting pleasure.
> (Some are mutually exclusive, some are not)
>
> Proposal 0:
> ----------------
>
> Do nothing
>
> Proposal 1:
> ----------------
> Add no new code, but document Data.Either to mention how to use `left` and
> (+++) from Control.Arrow
>
> Proposal 2:
> ----------------
> Document Control.Arrow to exemplify the (->) instance usage.
>
> 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
>
> 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
>
> Proposal 5:
> ----------------
>
> == Proposal 4, using the mapEither name instead.
>
> Proposal 6:
> ----------------
>
> Implement mapRight in Data.Either
>
> 6a) ... as (b -> c) -> Either a b -> Either a c
> 6b) ... as fmap
>
> Proposal 7:
> ----------------
>
> Don't implement mapRight, but include documentation in Data.Either stating
> that it is just fmap.
>
> Proposal 8:
> ----------------
>
> Bring bifunctors to base.
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140421/a928c3c9/attachment.html>
More information about the Libraries
mailing list