Abstract
We present an encoding of full linear lambda calculus in Haskell using higher order abstract syntax. By making use of promoted data kinds, multi-parameter type classes and functional dependencies, the encoding allows Haskell to do both linear type checking and linear type inference.
- Andrew Barber and Gordon Plotkin. Dual intuitionistic linear logic. University of Edinburgh, Department of Computer Science, Laboratory for Foundations of Computer Science, 1996.Google Scholar
- Jacques Carette, Oleg Kiselyov, and Chung-chieh Shan. Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages. Journal of Functional Programming, 19(05):509–543, 2009. Google Scholar
Digital Library
- A. Church. A formulation of a simple theory of types. Journal of Symbolic Logic, 5:56–68, 1940.Google Scholar
Cross Ref
- Richard A Eisenberg, Dimitrios Vytiniotis, Simon Peyton Jones, and Stephanie Weirich. Closed type families with overlapping equations. ACM SIGPLAN Notices, 49(1):671–683, 2014. Google Scholar
Digital Library
- Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for defining logics. Journal of the ACM (JACM), 40(1):143–184, 1993. Google Scholar
Digital Library
- Joshua S. Hodas. Logic Programming in Intuitionistic Linear Logic: Theory, Design and Implementation. PhD thesis, University of Pennsylvania, Department of Computer and Information Science, 1994. Google Scholar
Digital Library
- G. Huet and B. Lang. Proving and applying program transformations expressed with second-order patterns. Acta Informatica., 11(1):31–55, 1978. Google Scholar
Digital Library
- Mark P Jones. Type classes with functional dependencies. In Programming Languages and Systems, pages 230–244. Springer, 2000. Google Scholar
Digital Library
- Yukiyoshi Kameyama, Oleg Kiselyov, and Chung chieh Shan. Combinators for impure yet hygienic code generation. In Wei-Ngan Chin and Jurriaan Hage, editors, PEPM, pages 3–14. ACM, 2014. Google Scholar
Digital Library
- Oleg Kiselyov. Typed tagless final interpreters. In Generic and Indexed Programming, pages 130–174. Springer, 2012. Google Scholar
Digital Library
- Oleg Kiselyov, Ralf Lämmel, and Keean Schupke. Strongly typed heterogeneous collections. In Proceedings of the 2004 ACM SIGPLAN workshop on Haskell, pages 96–107. ACM, 2004. Google Scholar
Digital Library
- Sam Lindley and J.Garrett Morris. A semantics for propositions as sessions. In Jan Vitek, editor, Programming Languages and Systems, volume 9032 of Lecture Notes in Computer Science, pages 560–584. Springer Berlin Heidelberg, 2015..Google Scholar
- Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Geoffrey Washburn. Simple unification-based type inference for gadts. In ACM SIGPLAN Notices, volume 41, pages 50–61. ACM, 2006. Google Scholar
Digital Library
- Frank Pfenning. Linear functional programming. Lecture 16 from a course on Linear Logic., 2001.Google Scholar
- Frank Pfenning. Linear lambda calculus. Lecture 15 from a course on Linear Logic., 2001.Google Scholar
- Frank Pfenning and Rowan Davies. A judgmental reconstruction of modal logic. Mathematical structures in computer science, 11(04): 511–540, 2001. Google Scholar
Digital Library
- Frank Pfenning and Conal Elliott. Higher-order abstract syntax. In ACM SIGPLAN Notices, volume 23, pages 199–208. ACM, 1988. Google Scholar
Digital Library
- Frank Pfenning et al. Logic programming in the lf logical framework. Logical frameworks, pages 149–181, 1991. Google Scholar
Digital Library
- Jeff Polakow. Ordered linear logic and applications. PhD thesis, Carnegie Mellon University, 2001. Google Scholar
Digital Library
- Bernardo Toninho, Luis Caires, and Frank Pfenning. Higher-order processes, functions, and sessions: A monadic integration. In Proceedings of the 22Nd European Conference on Programming Languages and Systems, ESOP’13, pages 350–369, Berlin, Heidelberg, 2013. Springer-Verlag.. Google Scholar
Digital Library
- Philip Wadler. A taste of linear logic. In Mathematical Foundations of Computer Science 1993, pages 185–210. Springer, 1993. Google Scholar
Digital Library
- Brent A Yorgey, Stephanie Weirich, Julien Cretin, Simon Peyton Jones, Dimitrios Vytiniotis, and José Pedro Magalh˜aes. Giving haskell a promotion. In Proceedings of the 8th ACM SIGPLAN workshop on Types in language design and implementation, pages 53–66. ACM, 2012. Google Scholar
Digital Library
Index Terms
Embedding a full linear Lambda calculus in Haskell
Recommendations
Embedding a full linear Lambda calculus in Haskell
Haskell '15: Proceedings of the 2015 ACM SIGPLAN Symposium on HaskellWe present an encoding of full linear lambda calculus in Haskell using higher order abstract syntax. By making use of promoted data kinds, multi-parameter type classes and functional dependencies, the encoding allows Haskell to do both linear type ...
Linear lambda calculus with non-linear first-class continuations
ICSCA '17: Proceedings of the 6th International Conference on Software and Computer ApplicationsThe Curry-Howard isomorphism is the correspondence between propositions and types, proofs and lambda-terms, and proof normalization and evaluation. In Curry-Howard isomorphism, we find a duality between values and continuations in pure functional ...
Linearity and recursion in a typed Lambda-calculus
PPDP '11: Proceedings of the 13th international ACM SIGPLAN symposium on Principles and practices of declarative programmingWe show that the full PCF language can be encoded in L_rec, a syntactically linear λ-calculus extended with numbers, pairs, and an unbounded recursor that preserves the syntactic linearity of the calculus. We give call-by-name and call-by-value ...






Comments