rfc: Additions to Data.Either (take 2)

Oliver Charles ollie at ocharles.org.uk
Mon Apr 21 20:43:30 UTC 2014


On Mon, Apr 21, 2014 at 9:01 PM, João Cristóvão <jmacristovao at gmail.com>wrote:

>
> Proposal 0:
> ----------------
>
> Do nothing
>

Seeing as this has come up a bunch of times, -1 - as we clearly need to do
*something*.

Proposal 1:
> ----------------
> Add no new code, but document Data.Either to mention how to use `left` and
> (+++) from Control.Arrow
>

+1


> Proposal 2:
> ----------------
> Document Control.Arrow to exemplify the (->) instance usage.
>

More examples is in general a good idea - I see no harm in this. +1


> Proposal 3:
> ----------------
>

Proposal 4:
> ----------------
>


>
> Proposal 5:
> ----------------
>
> == Proposal 4, using the mapEither name instead.
>

Indifferent on these.


> Proposal 6:
> ----------------
>
> Implement mapRight in Data.Either
>
> 6a) ... as (b -> c) -> Either a b -> Either a c
> 6b) ... as fmap
>

-1 on this, as we don't have 'mapJust' and Functor is hardly an esoteric
type class.


Proposal 7:
> ----------------
>
> Don't implement mapRight, but include documentation in Data.Either stating
> that it is just fmap.
>

Again, more documentation is almost always a good thing. +1


Proposal 8:
> ----------------
>
> Bring bifunctors to base.
>

-1, and seems at ends with the split base proposals. I don't see much value
in growing base a whole lot more. I'm probably opening a whole 'nother can
of worms. Apologies ;)

>

- ocharles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140421/2f33077c/attachment-0001.html>


More information about the Libraries mailing list