Affiliation:
1. University of Pennsylvania, USA
Abstract
We introduce a technique for programming with domain-specific linear languages using the monad that arises from the theory of linear/non-linear logic. In this work we interpret the linear/non-linear model as a simple, effectful linear language embedded inside an existing non-linear host language. We implement a modular framework for defining these linear EDSLs in Haskell, allowing both shallow and deep embeddings. To demonstrate the effectiveness of the framework and the linearity monad, we implement languages for file handles, mutable arrays, session types, and quantum computing.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
6 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Linear Dependent Type Theory for Quantum Programming Languages;Logical Methods in Computer Science;2022-09-07
2. Linearity and Uniqueness: An Entente Cordiale;Programming Languages and Systems;2022
3. Safe mutation with algebraic effects;Proceedings of the 14th ACM SIGPLAN International Symposium on Haskell;2021-08-18
4. Linear Dependent Type Theory for Quantum Programming Languages;Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science;2020-07-08
5. Screaming in the IO monad: a realtime audio processing and control experiment in Haskell;Proceedings of the 7th ACM SIGPLAN International Workshop on Functional Art, Music, Modeling, and Design - FARM 2019;2019