darcs patch: Adding isLeft, isRight, fromLeft, fromRight, splitEithers

Neil Mitchell ndmitchell at gmail.com
Tue Oct 31 12:32:06 EST 2006


Hi

> I'm thinking of separating out the controversial isLeft, isRight,
> fromLeft, and fromRight from this patch, and focus on the less
> contravertial splitEithers.

NOOOOOOO!!! Those are the best bits in this patch! If you want to
propose removing head/tail/fromJust/isJust from Haskell, enhancing the
type system to catch this and requiring a dependantly typed proof of
every function - fine. But from a pragmatics point of view, these
functions are useful (I have them defined myself), unambiguous,
orthoganol (why have fromJust but not fromRight?) and something
everyone wants at their fingertips. Just for the symetry of the
library they should be kept in.

> Actually, I'm starting to like the name unzipEithers, so I propose
> changing this patch to add only unzipEithers, lefts, and rights.

While those functions are useful, I use the ones you're dropping much
much more...

Thanks

Neil


More information about the Libraries mailing list