skip to main content
research-article

Embedding a full linear Lambda calculus in Haskell

Published:30 August 2015Publication History
Skip Abstract Section

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.

References

  1. Andrew Barber and Gordon Plotkin. Dual intuitionistic linear logic. University of Edinburgh, Department of Computer Science, Laboratory for Foundations of Computer Science, 1996.Google ScholarGoogle Scholar
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Church. A formulation of a simple theory of types. Journal of Symbolic Logic, 5:56–68, 1940.Google ScholarGoogle ScholarCross RefCross Ref
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for defining logics. Journal of the ACM (JACM), 40(1):143–184, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. G. Huet and B. Lang. Proving and applying program transformations expressed with second-order patterns. Acta Informatica., 11(1):31–55, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Mark P Jones. Type classes with functional dependencies. In Programming Languages and Systems, pages 230–244. Springer, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. Oleg Kiselyov. Typed tagless final interpreters. In Generic and Indexed Programming, pages 130–174. Springer, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle Scholar
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. Frank Pfenning. Linear functional programming. Lecture 16 from a course on Linear Logic., 2001.Google ScholarGoogle Scholar
  15. Frank Pfenning. Linear lambda calculus. Lecture 15 from a course on Linear Logic., 2001.Google ScholarGoogle Scholar
  16. Frank Pfenning and Rowan Davies. A judgmental reconstruction of modal logic. Mathematical structures in computer science, 11(04): 511–540, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Frank Pfenning and Conal Elliott. Higher-order abstract syntax. In ACM SIGPLAN Notices, volume 23, pages 199–208. ACM, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Frank Pfenning et al. Logic programming in the lf logical framework. Logical frameworks, pages 149–181, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Jeff Polakow. Ordered linear logic and applications. PhD thesis, Carnegie Mellon University, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. Philip Wadler. A taste of linear logic. In Mathematical Foundations of Computer Science 1993, pages 185–210. Springer, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Embedding a full linear Lambda calculus in Haskell

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!