[containers] Proposal: Change to the Data.Map Monoid
Edward Kmett
ekmett at gmail.com
Sat Oct 10 19:36:44 UTC 2015
On Fri, Oct 9, 2015 at 3:37 AM, Julian Bean <jules at jellybean.co.uk> wrote:
> Apologies for digging out an 18 month old post, but it shows some context.
>
> In fact this proposal was made in 2012, resurrected in 2013, and re-made
> in 2014. Each time it has been defeated because it would break too much
> code to change it now.
>
> Would there be any downside to providing a package with a newtyped Map
> with all operations ported over? The newtype already exists in semigroups
> as UnionWith (Map k) v; what is missing is the entire Map API.
>
No downside at all. This is a package you could write and use today.
To be clear - this isn’t a library proposal, because it’s a proposal for a
> new package which will depend on containers and semigroups. However it is a
> suggestion of how we can solve the problem of Map having the wrong Monoid
> instance and not have to live with the problems forever. Who knows, one day
> in the future semigroups might be in base.
>
https://ghc.haskell.org/trac/ghc/ticket/10365
-Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20151010/45f9fc70/attachment.html>
More information about the Libraries
mailing list