ANN: list-tries-0.0 - first release

Announcing the first public release of list-tries! Version 0.0, woo! list-tries is a library providing implementations of finite sets and maps for list keys using tries, both simple and of the Patricia kind. The data types are parametrized over the map type they use internally to store the child nodes: this allows extending them to support different kinds of key types or increasing efficiency. To get at it, head over either to Hackage or my homepage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/list-tries http://iki.fi/matti.niemenmaa/list-tries/ It's Hugs-compliant to boot! I haven't tested UHC, but I suspect it'd work as well. I've tested compilation with both GHC 6.10 releases; 6.8 should also be fine. Being at version 0.0, I'm happy to get feedback, although I'm fairly busy with school for the foreseeable future so I can't promise I'll act on it very quickly. In particular, the API might be a bit unobvious due to the map type parametrization (and a bit cluttered due to the strict versions of just about every operation), but I hope it's not much trouble. I've actually had this release ready for a while now. I originally planned to coincide its release with that of GHC 6.10.2 since it needs a new version of 'containers' to build (see "Warning", below), but of course 'containers' wasn't updated since the changes that list-tries requires are API changes. I figured I might as well wait until 6.12.1, but with some recent buzz regarding tries I decided to just shove it out now, even as a crippled version due to the lack of a new enough 'containers'. Warning ======= In order to run properly, list-tries needs a version of 'containers' that hasn't yet been released. I incorporated a little hack which makes it compile even with 0.2, but some calls will fail by calling 'error': 30 of my 1014 test cases do so. If you have the latest Darcs version of 'containers' (which you probably do if you're using the GHC HEAD, for instance), make sure it's registered as a 0.3 version and then ask Cabal to build list-tries with the '-fcontainers03' flag. That way you'll get a fully-featured version of list-tries! Unfinished ========== I had hoped to get some benchmarks out before I released list-tries, to see if there's still much work to be done with respect to performance (and if there's any point in releasing it), but I didn't find the time. Data.ListTrie.Base.Map is largely undocumented, but it's not meant to be used much anyway so that shouldn't matter a great deal.

Matti Niemenmaa wrote:
In order to run properly, list-tries needs a version of 'containers' that hasn't yet been released. I incorporated a little hack which makes it compile even with 0.2, but some calls will fail by calling 'error': 30 of my 1014 test cases do so.
1014 test cases?! Wow. :-) FYI, list-tries installed without any problems (with containers-0.2.0.0). Thanks, Martijn.

Martijn van Steenbergen wrote:
Matti Niemenmaa wrote:
In order to run properly, list-tries needs a version of 'containers' that hasn't yet been released. I incorporated a little hack which makes it compile even with 0.2, but some calls will fail by calling 'error': 30 of my 1014 test cases do so.
1014 test cases?! Wow. :-)
The actual count is probably between 100 and 200: that includes all the ones generated via Template Haskell for the different parametrizations of the basic data types. Each test case splits into up to 12 different ones due to three axes: Patricia/not, list/Map/IntMap, and TrieSet/TrieMap. I just grabbed test-framework's count and didn't actually look at the source. :-)
FYI, list-tries installed without any problems (with containers-0.2.0.0).
Good to hear that it works for someone else, too. (I don't have a new enough version of containers installed myself, after upgrading to 6.10.2.) Just bear in mind that some functions won't work.

On Wed, Apr 22, 2009 at 12:29:05AM +0300, Matti Niemenmaa wrote:
Good to hear that it works for someone else, too. (I don't have a new enough version of containers installed myself, after upgrading to 6.10.2.) Just bear in mind that some functions won't work.
What exactly don't work? What is the problem with containers-0.2? Thanks, -- Felipe.

Felipe Lessa wrote:
On Wed, Apr 22, 2009 at 12:29:05AM +0300, Matti Niemenmaa wrote:
Good to hear that it works for someone else, too. (I don't have a new enough version of containers installed myself, after upgrading to 6.10.2.) Just bear in mind that some functions won't work.
What exactly don't work? What is the problem with containers-0.2?
The following three bugs are the problem: (1) http://hackage.haskell.org/trac/ghc/ticket/2644 (2) http://hackage.haskell.org/trac/ghc/ticket/2769 (3) http://hackage.haskell.org/trac/ghc/ticket/2960 (1) means that any intersection function will fail on a trie parametrized with an IntMap. (2) I worked around, it just means that mapAccumDescWithKey on a trie parametrized with a Map as well as mapAccumDesc and mapAccumDescWithKey on a trie parametrized with an IntMap will have worse performance, as they go via lists. Finally, (3) means that using any Traversable function on a trie parametrized with an IntMap will error out.
participants (3)
-
Felipe Lessa
-
Martijn van Steenbergen
-
Matti Niemenmaa