rfc: Additions to Data.Either (take 2)

João Cristóvão jmacristovao at gmail.com
Mon Apr 21 20:05:44 UTC 2014


And my own votes:

0) (-1)
1) (-1)
2) (+1)
3.a) (+1)
3.b) (0)
3.c) (+1)
4.a) (+1)
4.b) (0)
4.c) (+1)
5) (0)
6a) (-1)
6b) (-1)
7) (+1)
8) (+1)


2014-04-21 21:01 GMT+01:00 João Cristóvão <jmacristovao at gmail.com>:

> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140421/4c9ace9b/attachment.html>


More information about the Libraries mailing list