Re: [Haskell-cafe] ANN: unordered-container 0.1.3.0
Hi Joachim, On Sat, Jun 4, 2011 at 2:23 PM, Joachim Breitner wrote: > Hi Johan, > > Am Donnerstag, den 05.05.2011, 23:02 +0200 schrieb Johan Tibell: >> I've just uploaded a new version of the unordered-containers package, >> a package of fast hashing-based container types. > > I was looking into using HashMap in a tool for the Debian Haskell Group > that currently uses a somewhat large Map, but I found some functions > missing that I was using: > * unions > * element > * unionWith > * mapWithKey > > Do you plan to provide an API as similar to Map as possible, and those > functions just have not been implemented yet, or will those likely never > be added? I plan to add those functions. I just haven't gotten around to it (hacking on GHC at the moment). Feel free to send patches. -- Johan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: unordered-container 0.1.3.0
Hi, Am Samstag, den 04.06.2011, 14:23 +0200 schrieb Joachim Breitner: > I was looking into using HashMap in a tool for the Debian Haskell Group > that currently uses a somewhat large Map, but I found some functions > missing that I was using: > * unions > * element > * unionWith > * mapWithKey here are naive implementations using the current API, although I guess better code can be created within unordered-container: -- Functions from Data.Map missing in Data.HashMap unions = foldl M.union M.empty member k = isJust . M.lookup k unionWith f m1 m2 = M.foldrWithKey (M.insertWith f) m1 m2 mapWithKey f = runIdentity . M.traverseWithKey (\k v -> Identity (f k v)) Greetings, Joachim -- Joachim "nomeata" Breitner mail: m...@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nome...@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nome...@debian.org signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: unordered-container 0.1.3.0
Hi Johan, Am Donnerstag, den 05.05.2011, 23:02 +0200 schrieb Johan Tibell: > I've just uploaded a new version of the unordered-containers package, > a package of fast hashing-based container types. I was looking into using HashMap in a tool for the Debian Haskell Group that currently uses a somewhat large Map, but I found some functions missing that I was using: * unions * element * unionWith * mapWithKey Do you plan to provide an API as similar to Map as possible, and those functions just have not been implemented yet, or will those likely never be added? Thanks, Joachim -- Joachim "nomeata" Breitner Debian Developer nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: unordered-container 0.1.3.0
Hi all, I've just uploaded a new version of the unordered-containers package, a package of fast hashing-based container types. Version 0.1.3.0 [1] adds: * the ability to take the union of two maps, * lower memory overhead per key/value pair (contributed by Jan-Willem Maessen), and * the beginning of a `Data.HashSet` module (contributed by Bryan O'Sullivan). If you want to contribute, you can get the source from the git repository: git clone https://github.com/tibbe/unordered-containers.git Alternatively, just fork the project on GitHub [2]. 1. http://http://hackage.haskell.org/package/unordered-containers-0.1.3.0 2. https://github.com/tibbe/unordered-containers ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe