Strongly typed heterogeneous collections

Authors
Oleg Kiselyov, Ralf Lämmel, and Keean Schupke

Abstract
A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for look-up, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations. We describe HList --- a Haskell library for strongly typed heterogeneous collections including extensible records. We illustrate HList's benefits in the context of type-safe database access in Haskell. The HList library relies on common extensions of Haskell 98. Our exploration raises interesting issues regarding Haskell's type system, in particular, avoidance of overlapping instances, and reification of type equality and type unification.

Bibtex entries
Workshop version
@inproceedings{HList-HW04,
 author = {Oleg Kiselyov and Ralf L{\"a}mmel and Keean Schupke},
 title = "{Strongly typed heterogeneous collections}",
 booktitle = "{Haskell 2004: Proceedings of the ACM SIGPLAN workshop on Haskell}",
 year = {2004},
 isbn = {1-58113-850-4},
 pages = {96--107},
 location = {Snowbird, Utah, USA},
 doi = {http://doi.acm.org/10.1145/1017472.1017488},
 publisher = {ACM Press},
}
Extended TR version
@techreport{HLIST-TR,
 author = "Oleg Kiselyov and Ralf L{\"a}mmel and Keean Schupke",
 title = "{Strongly typed heterogeneous collections}",
 institution = "CWI, Amsterdam",
 number = "SEN-E0420",
 year = 2004,
 month = aug,
 notes = "15 pages"
}

Links

maintained by Ralf Lämmel (Email: rlaemmel@gmail.com)