Proposal: merge either into transformers
wren ng thornton
wren at freegeek.org
Sun Dec 9 15:01:06 CET 2012
On 12/7/12 1:01 PM, Edward Kmett wrote:
> On Fri, Dec 7, 2012 at 12:45 PM, Ross Paterson <ross at soi.city.ac.uk> wrote:
>> The either package has mapEitherT as the binary map
>>
>> mapEitherT :: Functor m => (e -> f) -> (a -> b) -> EitherT e m a ->
>> EitherT f m b
>>
>> but consistency with the rest of transformers would apply this name to
>>
>> mapEitherT :: (m (Either e a) -> n (Either e' b)) -> EitherT e m a ->
>> EitherT e' n b
>> mapEitherT f m = EitherT $ f (runEitherT m)
>
> Something that provides the existing 'mapEitherT' functionality would be
> nice to retain as it gets used in multiple packages. Perhaps bikeshed it to
> 'bimapEitherT', and use 'mapEitherT' for your notion?
+1 for bimapEitherT
--
Live well,
~wren
More information about the Libraries
mailing list