rfc: Additions to Data.Either (take 2)

Joachim Breitner mail at joachim-breitner.de
Thu Apr 24 14:27:34 UTC 2014


Hi,

Am Montag, den 21.04.2014, 21:01 +0100 schrieb João Cristóvão:
> 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

+1
(no strong opinion about the implementation)

> 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

+1

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

+1

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

+1

Greetings,
Joachim

-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140424/a24aea84/attachment.sig>


More information about the Libraries mailing list