
Hello! Can somebody recommend me a good collection library in Haskell? I'm interested in more than one Set implementation, one FiniteMap implementation etc. (we already have this in the standard Haskell'98 library). What I'm searching for is a library where I have the Set, FiniteMap etc. specifications (i.e., typeclasses), and several implementations (i.e., instances) for them. E.g., we can have a list-based implementation of Set (for small sets), but also a tree-based implementation (for larger sets). So, I would like a library with something like this -- sa is a type corresponding to sets of a's -- requires multi-parameter typeclasses class (Eq a) => Set a sa where addSetElem :: sa -> a -> sa -- add an element to a set searchElem :: sa -> a -> Bool -- search an element in a set ... -- list based Set implementation instance (Eq a) => Set a [a] where ... -- ordered-tree Set implementation instance (Ord a) => Set a (OrdTree a) where ... and so on. Furthermore, I'm interested in a library that can be compiled / interpreted by a mainstream tool, e.g., ghc, hugs etc. I've already started writting such a library (mainly for didactic purposes), but I would like to know if an enstablished collection library already exists. Thanks, Alex

G'day all.
Quoting "Alexandru D. Salcianu"
I'm interested in more than one Set implementation, one FiniteMap implementation etc. (we already have this in the standard Haskell'98 library).
The closest thing we have to this in semi-active development is Edison. Current version is here: http://sourceforge.net/projects/hfl/ It may not have all of the association/collection implementations that you want, but if you're already resigned to implementing them, then making them Edison-conformant wouldn't hurt. :-) Let me know if you want checkin rights.
Furthermore, I'm interested in a library that can be compiled / interpreted by a mainstream tool, e.g., ghc, hugs etc. I've already started writting such a library (mainly for didactic purposes), but I would like to know if an enstablished collection library already exists.
Edison works fine under GHC. It hasn't been officially ported to Hugs, but it doesn't use any GHC-onlyisms. I believe that hierarchical libraries, multi-parameter type classes and fundeps are the only extensions used. On the topic of Edison, everyone seems to agree that it's a good idea, but nobody seems to want it as an official part of their distributions, and for a good reason: It doesn't _quite_ seem like The Right Thing(tm). This is one reason why further development hasn't been a high priority lately. Cheers, Andrew Bromage

On Nov 20, 2003, at 22:28, ajb@spamcop.net wrote:
On the topic of Edison, everyone seems to agree that it's a good idea, but nobody seems to want it as an official part of their distributions, and for a good reason: It doesn't _quite_ seem like The Right Thing(tm). This is one reason why further development hasn't been a high priority lately.
Can you elaborate on (pointers to) the meaning of "The Right Thing"? Are Edison's flaws documented somewhere in the archives? -J

G'day all.
Quoting "Jeroen C.van Gelderen"
Can you elaborate on (pointers to) the meaning of "The Right Thing"?
No. Presumably we'll know it when we see it.
Are Edison's flaws documented somewhere in the archives?
The main flaw appears to be its unwieldiness. It's either a little too general, or perhaps not general enough to be simple. Nobody is entirely sure which. Cheers, Andrew Bromage

I've not yet used it myself, so I'm not sure if it fully meets your requirements, but Daan Leijen has a library at: http://www.cs.uu.nl/~daan/ddata.html #g -- At 17:18 20/11/03 -0500, Alexandru D. Salcianu wrote:
Hello!
Can somebody recommend me a good collection library in Haskell?
I'm interested in more than one Set implementation, one FiniteMap implementation etc. (we already have this in the standard Haskell'98 library).
What I'm searching for is a library where I have the Set, FiniteMap etc. specifications (i.e., typeclasses), and several implementations (i.e., instances) for them. E.g., we can have a list-based implementation of Set (for small sets), but also a tree-based implementation (for larger sets).
So, I would like a library with something like this
-- sa is a type corresponding to sets of a's -- requires multi-parameter typeclasses class (Eq a) => Set a sa where addSetElem :: sa -> a -> sa -- add an element to a set searchElem :: sa -> a -> Bool -- search an element in a set ...
-- list based Set implementation instance (Eq a) => Set a [a] where ...
-- ordered-tree Set implementation instance (Ord a) => Set a (OrdTree a) where ...
and so on.
Furthermore, I'm interested in a library that can be compiled / interpreted by a mainstream tool, e.g., ghc, hugs etc. I've already started writting such a library (mainly for didactic purposes), but I would like to know if an enstablished collection library already exists.
Thanks,
Alex
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
------------ Graham Klyne For email: http://www.ninebynine.org/#Contact
participants (4)
-
ajb@spamcop.net
-
Alexandru D. Salcianu
-
Graham Klyne
-
Jeroen C.van Gelderen