rfc: include bimap into Data.Either

Iavor Diatchki iavor.diatchki at gmail.com
Mon Apr 21 16:21:20 UTC 2014


Hello,


On Sun, Apr 20, 2014 at 10:20 AM, Dominique Devriese <
dominique.devriese at cs.kuleuven.be> wrote:

> First, here is a link to a post by Andreas in a previous discussion on
> this list about the same topic
>  http://www.haskell.org/pipermail/libraries/2013-August/020549.html
>
>
I think this makes a very good point.


> * rename bimap to mapEither (or perhaps mapBoth)
>
(+1)


> * implement the functions as renames when possible: "mapEither =
> Control.Arrow.(+++)" and similarly.
>

(+0) {- To me it seems more natural to have the overloaded versions be in
terms of the concrete ones,
rather then the other way around (i.e., the arrow instance should use
`mapEither`). -}


> * also add "mapRight :: (a -> b) -> Either c a -> Either c b"
>
> (+1)

-Iavor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140421/bd4db57f/attachment.html>


More information about the Libraries mailing list