Discussion: forM for Data.Set

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Discussion: forM for Data.Set

Julian Ospald
This was posted a year ago already, but without many comments:
https://mail.haskell.org/pipermail/libraries/2019-January/029335.html

So after cleaning up the PR a bit, adding tests and benchmarks, let's
give it another go.

PR is at: https://github.com/haskell/containers/pull/592

New functions are: forM, mapM, for, traverse

This follows the other Data.Set exported functions, overwriting Prelude
ones like foldr etc, so I think that's exactly what we want.


Cheers,
Julian Ospald
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Discussion: forM for Data.Set

George Wilson
Adding `traverse` and `for` to Data.Set seems like a good idea.

I am not convinced about adding mapM and forM if there's no
performance benefit to those versions. I'd rather not see that
redundancy proliferate without good reason. In base, I would like to
see those functions reduced to aliases per this thread [1], but that's
waiting on [2].

[1] https://mail.haskell.org/pipermail/libraries/2015-May/025708.html
[2] https://gitlab.haskell.org/ghc/ghc/issues/10071

Cheers,
George

On Fri, 10 Jan 2020 at 10:40, [hidden email] <[hidden email]> wrote:

>
> This was posted a year ago already, but without many comments:
> https://mail.haskell.org/pipermail/libraries/2019-January/029335.html
>
> So after cleaning up the PR a bit, adding tests and benchmarks, let's
> give it another go.
>
> PR is at: https://github.com/haskell/containers/pull/592
>
> New functions are: forM, mapM, for, traverse
>
> This follows the other Data.Set exported functions, overwriting Prelude
> ones like foldr etc, so I think that's exactly what we want.
>
>
> Cheers,
> Julian Ospald
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Discussion: forM for Data.Set

David Feuer
In reply to this post by Julian Ospald
I'm probably around +.25 on traverse and -1 on the rest. I don't want to clutter up the API too much with different forms of a derived operation when we don't even have evidence that it'll be used much.

On Thu, Jan 9, 2020, 7:31 PM [hidden email] <[hidden email]> wrote:
This was posted a year ago already, but without many comments:
https://mail.haskell.org/pipermail/libraries/2019-January/029335.html

So after cleaning up the PR a bit, adding tests and benchmarks, let's
give it another go.

PR is at: https://github.com/haskell/containers/pull/592

New functions are: forM, mapM, for, traverse

This follows the other Data.Set exported functions, overwriting Prelude
ones like foldr etc, so I think that's exactly what we want.


Cheers,
Julian Ospald

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries