It is well-known that the simply typed lambda-calculus is modeled by any cartesian closed category (CCC). This correspondence suggests giving typed functional programs a variety of interpretations, each corresponding to a different category. A
convenient way to realize this idea is as a collection of meaning-preserving transformations added to an existing compiler, such as GHC for Haskell. This paper describes such an implementation and demonstrates its use for a variety of interpretations including hardware circuits, automatic differentiation, incremental computation, and interval analysis. Each such
interpretation is a category easily defined in Haskell (outside of the compiler). The general technique appears to provide a
compelling alternative to deeply embedded domain-specific languages.
%0 Journal Article
%1 citeulike:14363157
%A Elliott, Conal
%D 2017
%K 68n15-programming-languages 18d15-closed-categories 18-01-category-theory-introductory-exposition
%T Compiling to Categories
%U http://conal.net/papers/compiling-to-categories/compiling-to-categories.pdf
%X It is well-known that the simply typed lambda-calculus is modeled by any cartesian closed category (CCC). This correspondence suggests giving typed functional programs a variety of interpretations, each corresponding to a different category. A
convenient way to realize this idea is as a collection of meaning-preserving transformations added to an existing compiler, such as GHC for Haskell. This paper describes such an implementation and demonstrates its use for a variety of interpretations including hardware circuits, automatic differentiation, incremental computation, and interval analysis. Each such
interpretation is a category easily defined in Haskell (outside of the compiler). The general technique appears to provide a
compelling alternative to deeply embedded domain-specific languages.
@article{citeulike:14363157,
abstract = {{It is well-known that the simply typed lambda-calculus is modeled by any cartesian closed category (CCC). This correspondence suggests giving typed functional programs a variety of interpretations, each corresponding to a different category. A
convenient way to realize this idea is as a collection of meaning-preserving transformations added to an existing compiler, such as GHC for Haskell. This paper describes such an implementation and demonstrates its use for a variety of interpretations including hardware circuits, automatic differentiation, incremental computation, and interval analysis. Each such
interpretation is a category easily defined in Haskell (outside of the compiler). The general technique appears to provide a
compelling alternative to deeply embedded domain-specific languages.}},
added-at = {2017-06-29T07:13:07.000+0200},
author = {Elliott, Conal},
biburl = {https://www.bibsonomy.org/bibtex/25261c1e23ecc7c451e30c68a580919a5/gdmcbain},
citeulike-article-id = {14363157},
citeulike-attachment-1 = {elliott_17_compiling.pdf; /pdf/user/gdmcbain/article/14363157/1110451/elliott_17_compiling.pdf; af90d37a3b4db0a6efa1ccfc9e99026245818348},
citeulike-linkout-0 = {http://conal.net/papers/compiling-to-categories/compiling-to-categories.pdf},
comment = {'Sydney Paper Club':https://www.meetup.com/Sydney-Paper-Club/events/239538124/ 2017-06-01
---=note-separator=---
'Haskell Cast 13':http://www.haskellcast.com/episode/013-john-wiegley-on-categories-and-compilers},
file = {elliott_17_compiling.pdf},
interhash = {4e51b7a5a1813b93830980c2b488fbc7},
intrahash = {5261c1e23ecc7c451e30c68a580919a5},
keywords = {68n15-programming-languages 18d15-closed-categories 18-01-category-theory-introductory-exposition},
posted-at = {2017-05-26 06:21:47},
priority = {5},
timestamp = {2020-08-21T07:04:33.000+0200},
title = {{Compiling to Categories}},
url = {http://conal.net/papers/compiling-to-categories/compiling-to-categories.pdf},
year = 2017
}