[Haskell-cafe] hash tables
David Turner
dct25-561bs at mythic-beasts.com
Fri Jan 27 07:41:16 UTC 2017
Hi Dennis,
Data.HashMap [1] is my preferred way to do this, which avoids any mucking
around in IO at all.
If that doesn't work for you, funnily enough the function you're looking
for may well be called `freeze` [2]
[1]
https://hackage.haskell.org/package/unordered-containers-0.2.7.2/docs/Data-HashMap-Strict.html
[2]
https://hackage.haskell.org/package/vector-0.12.0.0/docs/Data-Vector.html#v:freeze
On 27 Jan 2017 05:18, "Dennis Raddle" <dennis.raddle at gmail.com> wrote:
I want to build a hash table and then freeze it and use it for fast lookup
later. Is there a way to build it in IO or ST but freeze it and use it in
transparent code later?
D
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170127/cc751faa/attachment.html>
More information about the Haskell-Cafe
mailing list