[GHC] #974: Add unzipEithers, lefts, rights to Data.Either

Neil Mitchell ndmitchell at gmail.com
Mon Nov 13 15:46:54 EST 2006


> I think that the type of lefts and rights should be generalized to
> lefts :: (MonadPlus m) => m (Either a b) -> m a
> rights :: (MonadPlus m) => m (Either a b) -> m b
> Any concerns about this?  Are the names still acceptable?

I think the original one was much much clearer....

Now you have to know that list is an instance of MonadPlus, and have
to understand higher kinded type classes, just to grab the left things
out of a list.



More information about the Libraries mailing list