一句话:提出 Pure Borrow,在 Linear Haskell 中以纯函数方式实现 Rust 式借用,支持仿射可变引用的并行突变且保持纯度。
本文研究纯函数语言能否安全支持 Rust 式非局部借用,其中借用者可自由拆分与丢弃,而无需将所有权直接归还出借者。作者提出 Pure Borrow:一个在 Linear Haskell 中实现 Rust 式借用并保持纯度的框架,以库的形式提供,并形式化其核心及基于历史的借用模型。该框架支持纯计算内部的仿射可变引用及并行状态突变,不同于 IO/ST monad 与现有 Linear Haskell API;同时保持纯度、惰性求值、一等多态和无泄漏。作者通过并行计算案例展示其能力,并建立元理论以论证安全性、无泄漏与合流。
A promising approach to unifying functional and imperative programming paradigms is to localize mutation using linear or affine types. Haskell, a purely functional language, was recently extended with linear types by Bernardy et al., in the name of Linear Haskell. However, it remained unknown whether such a pure language could safely support non-local borrowing in the style of Rust, where each borrower can be freely split and dropped without direct communication of ownership back to the lender. We answer this question affirmatively with Pure Borrow , a novel framework that realizes Rust-style borrowing in Linear Haskell with purity. Notably, it features parallel state mutation with affine mutable references inside pure computation, unlike the IO and ST monads and existing Linear Haskell APIs. It also enjoys purity, lazy evaluation, first-class polymorphism and leak freedom, unlike Rust. We implement Pure Borrow simply as a library in Linear Haskell and demonstrate its power with a case study in parallel computing. We formalize the core of Pure Borrow and build a metatheory that works toward establishing safety, leak freedom and confluence, with a new, history-based model of borrowing.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@article{MatsushitaI26,
title = {Pure Borrow: Linear Haskell Meets Rust-Style Borrowing},
author = {Yusuke Matsushita and Hiromi Ishii},
journal = {Proceedings of the ACM on Programming Languages},
volume = {10},
number = {PLDI},
year = {2026},
doi = {10.1145/3808259}
}