{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,21]],"date-time":"2026-09-21T09:20:13Z","timestamp":1789982413831,"version":"4.0.1"},"reference-count":63,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2017,8,29]],"date-time":"2017-08-29T00:00:00Z","timestamp":1503964800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2017,8,29]]},"abstract":"<jats:p>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.<\/jats:p>","DOI":"10.1145\/3110271","type":"journal-article","created":{"date-parts":[[2017,8,29]],"date-time":"2017-08-29T14:19:41Z","timestamp":1504016381000},"page":"1-27","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":31,"title":["Compiling to categories"],"prefix":"10.1145","volume":"1","author":[{"given":"Conal","family":"Elliott","sequence":"first","affiliation":[{"name":"Target, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2017,8,29]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"Umut Acar. Self-adjusting computation . PhD thesis School of Computer Science Carnegie Mellon University May 2005.  Umut Acar. Self-adjusting computation . PhD thesis School of Computer Science Carnegie Mellon University May 2005."},{"key":"e_1_2_1_2_1","volume-title":"ML Workshop","author":"Acar Umut A.","year":"2005"},{"key":"e_1_2_1_3_1","doi-asserted-by":"crossref","unstructured":"Steve\n       \n      Awodey\n    .\n      \n  \n   \n  Category theory volume \n  49\n   of \n  Oxford Logic Guides\n  . \n  Oxford University Press 2006\n  .  Steve Awodey. Category theory volume 49 of Oxford Logic Guides. Oxford University Press 2006.","DOI":"10.1093\/acprof:oso\/9780198568612.001.0001"},{"key":"e_1_2_1_4_1","series-title":"Lecture Notes in Computer Science","first-page":"33","volume-title":"Trends in Functional Programming","author":"Baaij Christiaan","year":"2014"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/359576.359579"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(90)90152-8"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/289423.289440"},{"key":"e_1_2_1_9_1","unstructured":"Max Bolingbroke. Constraint kinds for GHC. http:\/\/blog.omega-prime.co.uk\/?p=127 2011.  Max Bolingbroke. Constraint kinds for GHC. http:\/\/blog.omega-prime.co.uk\/?p=127 2011."},{"key":"e_1_2_1_10_1","first-page":"156","volume-title":"Proceedings of the IFIP TC10\/WG 10.2 International Conference on Theorem Provers in Circuit Design: Theory, Practice and Experience","volume":"10","author":"Boulton Richard","year":"1993"},{"key":"e_1_2_1_11_1","first-page":"155","volume-title":"PLDI \u201914","author":"Cai Yufei","year":"2014"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/581478.581482"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/1086365.1086397"},{"key":"e_1_2_1_14_1","volume-title":"Principles of Programming Languages","author":"Chakravarty Manuel M. T.","year":"2005"},{"key":"e_1_2_1_15_1","unstructured":"Mark Chu-Carroll. Interpreting lambda calculus using closed cartesian categories. http:\/\/goodmath.scientopia.org\/2012\/03\/ 11\/interpreting-lambda-calculus-using-closed-cartesian-categories\/ March 2012.  Mark Chu-Carroll. Interpreting lambda calculus using closed cartesian categories. http:\/\/goodmath.scientopia.org\/2012\/03\/ 11\/interpreting-lambda-calculus-using-closed-cartesian-categories\/ March 2012."},{"key":"e_1_2_1_16_1","volume-title":"Claessen and David Sands. In Asian Computing Science Conference","author":"Koen","year":"1999"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6423(87)90020-7"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0019-9958(86)80047-X"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-78800-3_24"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/1017472.1017482"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/1596550.1596579"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110251"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796802004574"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2364506.2364508"},{"key":"e_1_2_1_25_1","unstructured":"GHC Team. The Glorious Glasgow Haskell compilation system user\u2019s guide version 8.0.1. https:\/\/downloads.haskell.org\/ ~ghc\/latest\/docs\/html\/users_guide 2016.  GHC Team. The Glorious Glasgow Haskell compilation system user\u2019s guide version 8.0.1. https:\/\/downloads.haskell.org\/ ~ghc\/latest\/docs\/html\/users_guide 2016."},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-47797-7_5"},{"key":"e_1_2_1_27_1","volume-title":"ICFP","author":"Gibbons Jeremy","year":"2014"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/1596638.1596653"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/2605205"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809007175"},{"key":"e_1_2_1_31_1","first-page":"32","volume-title":"Workshop on Generic Programming","author":"Hinze Ralf","year":"2000"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-349-91518-7_12"},{"key":"e_1_2_1_33_1","first-page":"27","volume-title":"Science of Computer Programming","author":"Hinze Ralf","year":"2004"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-59451-5_3"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0167-6423(99)00023-4"},{"key":"e_1_2_1_36_1","unstructured":"John Hughes and Simon Peyton Jones. The pretty package. https:\/\/hackage.haskell.org\/package\/pretty November 2007. Haskell library.  John Hughes and Simon Peyton Jones. The pretty package. https:\/\/hackage.haskell.org\/package\/pretty November 2007. Haskell library."},{"key":"e_1_2_1_37_1","unstructured":"Geraint Jones and Mary Sheeran. Circuit design in Ruby . Formal methods for VLSI design 1 1990.  Geraint Jones and Mary Sheeran. Circuit design in Ruby . Formal methods for VLSI design 1 1990."},{"key":"e_1_2_1_38_1","first-page":"117","volume-title":"In ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation","author":"Jones Mark P.","year":"1994"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/289423.289442"},{"key":"e_1_2_1_40_1","unstructured":"Edward Kmett. What constraints entail: Part 1. http:\/\/comonad.com\/reader\/2011\/what-constraints-entail-part-1\/ 2011.  Edward Kmett. What constraints entail: Part 1. http:\/\/comonad.com\/reader\/2011\/what-constraints-entail-part-1\/ 2011."},{"key":"e_1_2_1_41_1","volume-title":"Academic Press","author":"Lambek Joachim","year":"1980"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-17184-3_44"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9780511804199"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/331960.331977"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/1863523.1863529"},{"key":"e_1_2_1_46_1","volume-title":"GHC.Generics","author":"Pedro Jos\u00e9","year":"2011"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796899003299"},{"key":"e_1_2_1_48_1","volume-title":"Prentice-Hall","author":"Moore R.E.","year":"1966"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(90)90154-A"},{"key":"e_1_2_1_50_1","first-page":"666","volume-title":"Functional programming languages and computer architecture","author":"Jones Simon Peyton","year":"1991"},{"issue":"5","key":"e_1_2_1_51_1","article-title":"Secrets of the Glasgow Haskell compiler inliner","volume":"12","author":"Jones Simon Peyton","year":"2002","journal-title":"Journal of Functional Programming"},{"key":"e_1_2_1_52_1","first-page":"233","volume-title":"Haskell Workshop","author":"Jones Simon Peyton","year":"2001"},{"key":"e_1_2_1_53_1","first-page":"44","volume-title":"European Symposium on Programming","author":"Peyton Jones Simon L.","year":"1996"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1145\/2500365.2500602"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-41582-1_6"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1145\/800055.802026"},{"key":"e_1_2_1_57_1","first-page":"41","volume-title":"Logic in Computer Science","author":"Simpson Alex","year":"2000"},{"key":"e_1_2_1_58_1","first-page":"9","volume-title":"Implementation and Application of Functional Languages","author":"Siskind Jeffrey Mark","year":"2005"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10990-008-9037-1"},{"key":"e_1_2_1_60_1","volume-title":"HarperCollins Publishers","author":"Spivak Michael","year":"1971"},{"key":"e_1_2_1_61_1","first-page":"66","volume-title":"Types In Languages Design And Implementation","author":"Sulzmann Martin","year":"2007"},{"key":"e_1_2_1_62_1","unstructured":"Pierre Weis et al. A history of Caml 2005. URL https:\/\/caml.inria.fr\/about\/history.en.html . Last updated 2005-01-28.  Pierre Weis et al. A history of Caml 2005. URL https:\/\/caml.inria.fr\/about\/history.en.html . Last updated 2005-01-28."},{"key":"e_1_2_1_63_1","doi-asserted-by":"publisher","DOI":"10.1145\/355586.364791"},{"key":"e_1_2_1_64_1","first-page":"66","volume-title":"Types In Languages Design And Implementation","author":"Yorgey Brent A."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3110271","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3110271","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T00:38:44Z","timestamp":1750207124000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3110271"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,8,29]]},"references-count":63,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2017,8,29]]}},"alternative-id":["10.1145\/3110271"],"URL":"https:\/\/doi.org\/10.1145\/3110271","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,8,29]]},"assertion":[{"value":"2017-08-29","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}