Template meta-programming for Haskell
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Definitional interpreters for higher-order programming languages
ACM '72 Proceedings of the ACM annual conference - Volume 2
Strongly typed heterogeneous collections
Haskell '04 Proceedings of the 2004 ACM SIGPLAN workshop on Haskell
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Type checking with open type functions
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Just do it while compiling!: fast extensible records in haskell
PEPM '13 Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
Hi-index | 0.00 |
Common record systems only provide access to individual record fields. However, it is often useful to have generic record combinators, that is, functions that work with complete records of varying structure. Traditionally, generic record combinators can only be implemented in dynamically typed languages. In this paper, we present a record system for Haskell that allows us to define generic record combinators without giving up static type checks. The system is implemented as a library so that it works without modifications to the language. We achieve this mainly by using advanced type system features such as type equality constraints, type families, and higher-rank polymorphism. A key contribution of our paper is a technique for emulating subkinds, including subkind polymorphism. We use this to give the record system additional expressiveness. Our system is not only useful in itself. It also shows what features should be taken into account when designing language support for records.