[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.

Any comments?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100219/e2313f1d/attachment.html

More information about the Haskell-Cafe mailing list