Containers are a semantic way to talk about strictly positive types. In previous work it was shown that containers are closed under various constructions including products, coproducts, initial algebras and terminal coalgebras. In the present paper we show that, surprisingly, the category of containers is cartesian closed, giving rise to a full cartesian closed subcategory of endofunctors. The result has interesting applications in generic programming and representation of higher order abstract syntax. We also show that the category of containers has finite limits, but it is not locally cartesian closed.
KeywordsDatatypes Category Theory Functional Programming
Unable to display preview. Download preview PDF.
- 1.Abbott, M.: Categories of Containers. PhD thesis, University of Leicester (2003)Google Scholar
- 3.Abbott, M., Altenkirch, T., Ghani, N., McBride, C.: Constructing polymorphic programs with quotient types. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 2–15. Springer, Heidelberg (2004)Google Scholar
- 5.Altenkirch, T., Morris, P.: Indexed containers. In: Twenty-Fourth IEEE Symposium in Logic in Computer Science, LICS 2009 (2009)Google Scholar
- 6.Altenkirch, T., Reus, B.: Monadic presentations of lambda terms using generalized inductive types. In: Computer Science Logic (1999)Google Scholar
- 7.Bird, R., Paterson, R.: Generalised folds for nested datatypes. Formal Aspects of Computing 11(3) (1999)Google Scholar
- 9.Fiore, M.P.: Enrichment and representation theorems for categories of domains and continuous functions (March 1996)Google Scholar
- 10.Fiore, M.P., Menni, M.: Reflective Kleisli subcategories of the category of Eilenberg-Moore algebras for factorization monads. Theory Appl. of Categ. 15 (2005)Google Scholar
- 11.Kelly, G.M.: Basic concepts of enriched category theory. Lecture Notes in Mathematics, vol. 64. Cambridge University Press, Cambridge (1982); Republished in Reprints in Theory and Applications of Categories 10, 1-136 (2005)Google Scholar
- 12.Martin-Löf, P.: An intuitionistic theory of types: Predicative part. In: Rose, H.E., Shepherdson, J.C. (eds.) Proceedings of the Logic Colloquium, pp. 73–118. North-Holland, Amsterdam (1974)Google Scholar
- 13.McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1) (2004)Google Scholar
- 14.Norell, U.: Towards a Practical Programming Language based on Dependent Type Theory. PhD thesis, Chalmers University of Technology (2007)Google Scholar
- 15.Prince, R., Ghani, N., McBride, C.: Proving Properties of Lists using Containers. In: FLOPS (2008)Google Scholar
- 17.Staton, S.: General structural operational semantics through categorical logic. In: Symposium on Logic in Computer Science, pp. 166–177 (2008)Google Scholar