<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 20, 2013 at 11:39 AM, Ertugrul Söylemez <span dir="ltr"><<a href="mailto:es@ertes.de" target="_blank">es@ertes.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>> What is the state of container libraries? I am looking for a library<br>
> which provides:<br>
><br>
> * unordered containers (for "operational" type safety, I don't want to<br>
> impose orders on things that don't have them -- unordered containers<br>
> does this)<br>
<br>
</div>You are imposing an order.<br></blockquote><div><br></div><div>I mean I don't want Ord instances for types with no "natural" order. I don't mind that a container structure will impose the topological order, or that containers can be ordered by inclusion.</div>
<div><br></div><div>In particular, I have datatypes whose values represent incomparable "atoms" of some type. A comparison between them should "really" yield bottom. So an Ord-based container is not appropriate. I'd rather not have an Ord instance for these types and therefore statically eliminate that bottom.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
<br>
> * can handled nested containers (containers does that)<br>
> * can be serialized easily, or better yet, has Generic instances<br>
><br>
> Does such a library exist? What are you using for Set and Map needs?<br>
<br>
</div>What's wrong with 'containers' itself? I prefer Map/Set over<br>
HashMap/HashSet, because the speed difference is small and only<br>
noticable for large maps/sets. If you need multiple indices, there is<br>
IxSet.</blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">I took a look at 'hashmap', which uses 'hashable' and 'containers' to implement hash containers. I worried about the performance, and thought I'd ask for opinions on containers.</div>
<br>My goal is to create an IxSet-like structure which can handle unordered types, and preferably whose indices can be derived GHC.Generics-ally.</div></div>