Map with a different Monoid instance

Ryan Trinkle ryan.trinkle at gmail.com
Thu May 25 18:41:53 UTC 2017


Hi David,

Totally agreed.  I'm not quite sure how to approach the naming issue,
either - there's definitely potential for confusion, which we need to try
very hard to avoid.  However, the Monoid instance for Map is certainly
something I've run into many times, and newtyping Map involves a pretty
huge amount of boilerplate.

I also agree about separating safe and unsafe functions.  Especially with
your new combinators in Data.Map.Merge and friends, I'd like to have a
straightforward way to ensure we get rid of any unsafe functions in our
code.


Best,
Ryan

On Thu, May 25, 2017 at 12:55 PM, David Feuer <david.feuer at gmail.com> wrote:

A lot of people have wrappers around Data.Map and Data.IntMap to give them
> more useful (Semigroup and) Monoid instances. I'd like to add such wrappers
> to containers. What we need to be able to do that are *names* for the new
> modules. I can't think of any, so I'm reaching out to the list. Please
> suggest names! Another question is whether we should take the opportunity
> of new modules to modernize and streamline the API a bit. I'd like, at
> least, to separate "safe" from "unsafe" functions, putting the unsafe ones
> in .Unsafe modules.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170525/bc76a3e1/attachment.html>


More information about the Libraries mailing list