I'm going to go out on a limb here so bear with me...
This is NOT a Haskel specific answer, but it is an alternative way of approaching the problem, and one that I do happen to know works exceptionally well in other languages as I've personally used it.
The portable database "SQLite" unknown to many, has an exceptionally useful in memory database mode.
When you open a database, rather than giving the engine a file name that exists on disk, if you open it using the special name ':memory:' the entire data-store will be created directly in ram with no disk persistence.
Initially this data store will be empty, but if you have a source SQlite database on disk, it's a simple matter to load the table definitions SQL from the system tables, then replay them onto the in-memory store, followed by simply copying the data over.
Once you complete this start-up step, all your data is there ready to use, and rather than doing anything complex like hash-maps, dictionaries and messy allocation/de-allocation strategies, you get to simply execute standard SQL statements directly onto the store such as:
select x from y
By doing this, SQLite does ALL the heavy lifting for you, leaving you free just to concentrate on what your service needs to do.
Since SQLite is such a portable, cross platform system there are bindings available for it for Haskel.
I can't comment on the actual Haskel approach as I'm not an active Haskel user (Even though I have used it in the past) but Iv'e used this exact same technique in Java, .NET, PHP, Perl and a few others, and it's worked flawlessly every time
Store ! blah
andStore ! baz
will have to be sequential – jozefg Jul 17 '13 at 10:13