<div><div dir="auto">Off hand that seems like it’d break every single piece of code that uses those data structures today or at the very least possibly weaken type inference in some cases. </div><div dir="auto"><br></div><div dir="auto">Or maybe I’m over thinking things. </div><div dir="auto"><br></div><div dir="auto">I do think it’d be super to experiment with that as a child package so we can all try it out and see how the ux compares vs the usual approaches people do today</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">One possible gotcha / law that would need to be true for such new types is that the Ord and Eq instanced would have to be the same as INT.  AT least for some parts of the container api.  </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 29, 2019 at 12:46 PM Georg Rudoy <<a href="mailto:0xd34df00d@gmail.com">0xd34df00d@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi folks,<div><br></div><div>What do you think about making IntMap and IntSet polymorphic over the keys as long as the key type k is Coercible to Int?</div><div><br></div><div>The motivation is that oftentimes one needs to have a collection of newtype wrappers around Int, and then they have to either unpack/repack it around the relevant containers (which is not nice), or just use HashMap/HashSet (which is perhaps suboptimal).</div><div><br></div><div>If this is a direction the community might deem reasonable, I'd be happy to work on this and make a PR to the containers repo (perhaps after discussing the specific details about naming, etc).</div></div><div dir="ltr"><div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_8296618453186711935gmail_signature" data-smartmail="gmail_signature">  Georg Rudoy</div></div></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div></div>