Recognition: unknown
Pure Borrow: Linear Haskell Meets Rust-Style Borrowing
Pith reviewed 2026-05-10 08:54 UTC · model grok-4.3
The pith
Pure Borrow shows that Linear Haskell can support Rust-style non-local borrowing while preserving purity.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
Pure Borrow is a library and formal framework that embeds Rust-style borrowing into Linear Haskell. It permits affine mutable references to be created, borrowed, split, and dropped non-locally inside pure computations, enabling parallel mutation without monadic wrappers. The framework guarantees purity, lazy evaluation, first-class polymorphism, and leak freedom. Safety, leak freedom, and confluence are addressed via a history-based model that tracks borrow lifetimes to enforce the required invariants for splittable, non-communicating ownership transfer.
What carries the argument
The history-based model of borrowing, which records sequences of borrow events to enforce rules for creation, splitting, and dropping of affine references without direct lender-borrower communication.
If this is right
- Parallel mutable state updates become expressible directly inside pure Haskell functions without IO or ST.
- Borrowed references can be freely split and discarded without returning ownership to the original lender.
- Leak freedom and confluence hold even when multiple borrowers operate concurrently on the same reference.
- First-class polymorphic functions can still be used with borrowed mutable data, unlike typical Rust restrictions.
Where Pith is reading between the lines
- The same history-tracking approach could be adapted to add similar borrowing to other linearly typed functional languages.
- It opens a route to imperative data structures inside pure code that remain compatible with Haskell's laziness and equational reasoning.
- Future extensions might support more advanced patterns such as conditional reborrowing while keeping the purity guarantees.
Load-bearing premise
The history-based model correctly encodes the semantics required to prove that non-local splittable borrowing remains safe, leak-free, and confluent in Linear Haskell.
What would settle it
A concrete Pure Borrow program that type-checks under the history model yet produces a data race, use-after-free, or non-confluent result when executed would falsify the safety and confluence claims.
Figures
read the original abstract
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.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents Pure Borrow, a library implementation in Linear Haskell that realizes Rust-style non-local, splittable borrowing using affine mutable references inside pure computations. It claims to enable parallel state mutation while preserving purity, lazy evaluation, first-class polymorphism, and leak freedom (unlike Rust or the IO/ST monads). The work includes a parallel-computing case study and a formalization of the core with a metatheory based on a novel history-based model of borrowing, aimed at establishing safety, leak freedom, and confluence.
Significance. If the metatheory holds, the result would be a notable advance in unifying linear/affine types with pure functional programming, offering a library-based path to imperative features without monadic overhead. The history-based model is a fresh semantic device that could inform future linear-type designs; the library implementation and case study provide immediate usability evidence. The paper earns credit for delivering a concrete library artifact and for attempting a metatheory that targets the three key properties simultaneously.
major comments (2)
- [§4.2] §4.2, Definition 4.1 (history-based borrowing model): the model encodes borrowing via sequences of access events, yet the invariant for splittable affine references (Lemma 4.5) assumes histories remain single-threaded after splitting; this assumption is load-bearing for the leak-freedom and confluence claims when non-local borrowers mutate in parallel, as required by the case study.
- [Theorem 5.3] Theorem 5.3 (confluence): the proof sketch relies on history reconciliation commuting under parallel mutation, but no reduction cases or counter-example analysis are given for the splittable-borrower scenario; without this, the central claim that Pure Borrow is confluent in the presence of non-local borrowing cannot be verified from the provided metatheory.
minor comments (2)
- [§3.1] §3.1: the library API is introduced with several combinators, but the linear-type signatures for the key borrowing primitives (e.g., borrow and split) are omitted from the main text and only appear in an appendix; this hinders readability.
- [Figure 2] Figure 2: the state-transition diagram for lender/borrower lifetimes is difficult to read at the printed size; labels on the split and drop arrows are too small.
Simulated Author's Rebuttal
We thank the referee for the thorough review and for identifying areas where the metatheory presentation can be strengthened. We agree that the history-based model and confluence proof require additional detail on splittable borrowers under parallel mutation to make the arguments fully verifiable. We will revise the manuscript to address both points.
read point-by-point responses
-
Referee: [§4.2] §4.2, Definition 4.1 (history-based borrowing model): the model encodes borrowing via sequences of access events, yet the invariant for splittable affine references (Lemma 4.5) assumes histories remain single-threaded after splitting; this assumption is load-bearing for the leak-freedom and confluence claims when non-local borrowers mutate in parallel, as required by the case study.
Authors: We appreciate this observation. In the history-based model, splitting an affine reference creates independent history segments for each borrower; the single-threaded invariant in Lemma 4.5 applies locally to each segment, while global consistency is restored via reconciliation at the lender upon borrow termination. Parallel mutations are permitted precisely because each segment records only its own accesses. However, the current write-up does not explicitly separate local vs. reconciled histories in the splittable case. We will revise Definition 4.1 and Lemma 4.5 to state the local-segment invariant clearly and add a short paragraph explaining how reconciliation preserves leak freedom and confluence for the parallel case study. revision: yes
-
Referee: [Theorem 5.3] Theorem 5.3 (confluence): the proof sketch relies on history reconciliation commuting under parallel mutation, but no reduction cases or counter-example analysis are given for the splittable-borrower scenario; without this, the central claim that Pure Borrow is confluent in the presence of non-local borrowing cannot be verified from the provided metatheory.
Authors: The referee is correct that the proof sketch in Theorem 5.3 is high-level and omits explicit reduction rules and case analysis for splittable borrowers. The underlying argument is that history reconciliation is a commutative operation on disjoint access sequences, which precludes write-write conflicts. To make this verifiable, we will expand the proof with the missing reduction cases (including the parallel split-and-mutate rule) and include a brief counter-example check showing that no confluence violation arises when two splittable borrowers mutate distinct regions. This material will be added to the main text or a dedicated appendix subsection. revision: yes
Circularity Check
No significant circularity; novel history-based model introduced independently
full rationale
The paper presents Pure Borrow as a new library and formalization in Linear Haskell, with a newly introduced history-based model of borrowing used to prove safety, leak freedom, and confluence. No equations or derivations reduce by construction to fitted parameters, self-definitions, or load-bearing self-citations; the metatheory is built from first principles on the new model rather than renaming or importing prior results as forced inputs. The central claims rest on the independent formalization and case study, making the derivation self-contained.
Axiom & Free-Parameter Ledger
axioms (1)
- domain assumption Linear types as extended in Linear Haskell by Bernardy et al.
invented entities (1)
-
Pure Borrow framework and history-based borrowing model
no independent evidence
Reference graph
Works this paper leans on
-
[1]
Pure Borrow: Linear Haskell Meets Rust-Style Borrowing
Report on the Programming Language Haskell, A Non-strict, Purely Functional Language.ACM SIGPLAN Notices 27, 5 (1992), 1. doi:10.1145/130697.130699 Jane Street. 2025.OxCaml. https://oxcaml.org/ Ralf Jung, Jacques-Henri Jourdan, Robbert Krebbers, and Derek Dreyer. 2018a. RustBelt: Securing the Foundations of the Rust Programming Language.Proc. ACM Program....
-
[2]
if 𝛽≤𝛼 0 and 𝛽≤𝛼 1, then 𝛽≤𝛼 0 ∧𝛼 1
Dependent Types and Multi-monadic Effects in F ★. InProceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, St. Petersburg, FL, USA, January 20 - 22, 2016, Rastislav Bodík and Rupak Majumdar (Eds.). ACM, 256–270. doi:10.1145/2837614.2837655 The Rust Community. 2017.2094-nll - The Rust RFC Book. https:...
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.