[Haskell-cafe] Harder than you'd think
andrewcoppin at btinternet.com
Sun Jun 13 09:52:18 EDT 2010
Marc Weber wrote:
>> Does anybody have a less-insane way of doing this?
> type MyMap = Map (KeyID, Key) Value
> Don't use multiple keys. Put the keys into a tuple and use that as key.
> Let me know whether this is what you were looking for.
Trouble is, this requires you to have *all* the keys to perform a single
lookup. You can't do a lookup on just one attribute.
> I tried writing something like this. Yet SQL gives all this stiff for
[Except that SQL bindings don't work on Windows. Besides, I'm only
working with small data volumes, I don't need persistence or transaction
> I still wonder which is the nicest way to express this data in
> Haskell without coding everything yourself..
More information about the Haskell-Cafe