Journal article
Towards a Categorical Foundation for Generic Programming
- Abstract:
- Generic Haskell is an extension of Haskell that supports datatypegeneric programming. The central idea of Generic Haskell is to interpret a type by a function, the so-called instance of a generic function at that type. Since types in Haskell include parametric types such as 'list of', Generic Haskell represents types by terms of the simply-typed lambda calculus. This paper puts the idea of interpreting types as functions on a firm theoretical footing, exploiting the fact that the simply-typed lambda calculus can be interpreted in a cartesian closed category. We identify a suitable target category, a subcategory of Cat, and argue that slice, coslice and comma categories are a good fit for interpreting generic functions at base types. Copyright © 2011 ACM.
- Publication status:
- Published
Actions
Access Document
- Publisher copy:
- 10.1145/2036918.2036926
Authors
- Journal:
- WGP 11: PROCEEDINGS OF THE 2011 ACM SIGPLAN WORKSHOP ON GENERIC PROGRAMMING More from this journal
- Pages:
- 47-58
- Publication date:
- 2011-01-01
- DOI:
- Language:
-
English
- Keywords:
- Pubs id:
-
pubs:328766
- UUID:
-
uuid:0cbb73fc-25d6-41ec-a50c-c0b11ccef0fe
- Local pid:
-
pubs:328766
- Source identifiers:
-
328766
- Deposit date:
-
2012-12-19
- ARK identifier:
Terms of use
- Copyright date:
- 2011
If you are the owner of this record, you can report an update to it here: Report update to this record