Proposal: Add isLeft/isRight to Data.Either

Herbert Valerio Riedel hvr at
Thu Dec 6 12:55:49 CET 2012

Herbert Valerio Riedel <hvr at> writes:


>    and also their dual (see fromRight' above) is defined there:

sorry, I was mixed something up; ignore that "(see fromRight' above)" comment

the dual to 'maybeRight' is rather something like:

maybeToRight :: a -> Maybe b -> Either a b
maybeToRight l = maybe (Left l) Right

>     - precis:Precis.Utils.ControlOperators.elaborate
>     - errors:Control.Error.Util.note

>  - from{Left,Right} are useful when working in the 'Maybe' monad or


More information about the Libraries mailing list