collection library in Haskell

Graham Klyne GK at ninebynine.org
Fri Nov 21 15:30:04 EST 2003


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 at haskell.org
>http://www.haskell.org/mailman/listinfo/haskell-cafe

------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact



More information about the Haskell-Cafe mailing list