[Haskell-cafe] fast, strongly typed heterogeneous collections
Alberto G. Corona
agocorona at gmail.com
Fri Feb 19 06:43:40 EST 2010
What is the speed of hProjectByLabel/s in Data.HList.Record? . The
documentation in hackage
not mention it. Perhaps this is because Hlist is designed for supposedly
short records and this does not matter too much.
looking at the code I guess that everything in HList is O(n) because it
uses type-level list structure, but I think that nothing prevents from using
a type level balanced tree, Data.Map style, instead.
This would permit to implement large heterogeneous Maps with fast access
and strongly typed. AFAIK, the alternative is to use a fast data container
with data elements encapsulated within Data.Dynamic, that is weakly typed,
produces type errors at runtime, which is unsatisfactory and dangerous.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe