rfc: Additions to Data.Either (take 2)

Dominique Devriese dominique.devriese at cs.kuleuven.be
Mon Apr 21 20:35:00 UTC 2014


First, I think Edward suggested to bring only some main *parts* of bifunctors to
base, not the full package.  Is this what you meant with proposal 8?

If so, I'm +1 on proposals 3,4,5,7 and 8, -1 to proposal 1,
indifferent on the others.  Proposal 8 is my favourite.

Regards,
Dominique

2014-04-21 22:01 GMT+02: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.
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>


More information about the Libraries mailing list