Proposal: add fromRight and fromLeft to Data.Either

Edward Kmett ekmett at gmail.com
Tue May 31 22:17:28 UTC 2016


It is a minor annoyance, not a -1. The fromLeft and fromRight there got
merged in from another package when we started consolidating.

I've never really given them conscious thought, but on the plus side, I'd
get to just re-export the combinators from base in Data.Either.Combinators
avoiding conflicts.

I'm a weak +1 on adding the total versions that Wren espoused above.

-Edward

On Mon, May 30, 2016 at 3:29 AM, lennart spitzner <
lsp at informatik.uni-kiel.de> wrote:

> On 30/05/16 03:40, Edward Kmett wrote:
> > The main annoyance with the total versions is that the existing fromJust
> > has the wrong convention.
> >
> > Oh well. Consistency is overrated.
>
> So you don't mind the breaking change in the `either` package?
>
> For the lazy; `either` defines:
>
> > Data.Either.Combinators.fromLeft  :: a -> Either a b -> a
> > Data.Either.Combinators.fromLeft' :: Either a b -> a
> (~Right similarly)
>
> Also, packages `MissingH` and `extra` define the consistent
>
> > fromLeft :: Either a b -> a
>
> (don't know if user numbers of those count as significant in any way.)
>
> -1 on both partial and inconsistent total
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160531/485f736a/attachment.html>


More information about the Libraries mailing list