Live Functional Programming with Typed Holes
Not on the map. Why?
Abstract (arXiv)
This paper develops a dynamic semantics for incomplete functional programs, starting from the static semantics developed in recent work on Hazelnut. We model incomplete functional programs as expressions with holes, with empty holes standing for missing expressions or types, and non-empty holes operating as membranes around static and dynamic type inconsistencies. Rather than aborting when evaluation encounters any of these holes as in some existing systems, evaluation proceeds around holes, tracking the closure around each hole instance as it flows through the remainder of the program. Editor services can use the information in these hole closures to help the programmer develop and confirm their mental model of the behavior of the complete portions of the program as they decide how to fill the remaining holes. Hole closures also enable a fill-and-resume operation that avoids the need to restart evaluation after edits that amount to hole filling. Formally, the semantics borrows machinery from both gradual type theory (which supplies the basis for handling unfilled type holes) and contextual modal type theory (which supplies a logical basis for hole closures), combining these and developing additional machinery necessary to continue evaluation past holes while maintaining type safety. We have mechanized the metatheory of the core calculus, called Hazelnut Live, using the Agda proof assistant. We have also implemented these ideas into the Hazel programming environment. The implementation inserts holes automatically, following the Hazelnut edit action calculus, to guarantee that every editor state has some (possibly incomplete) type. Taken together with this paper's type safety property, the result is a proof-of-concept live programming environment where rich dynamic feedback is truly available without gaps, i.e. for every reachable editor state.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). First posted on arXiv 1 May 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 1; 2022: 0; 2023: 0; 2024: 1; 2025: 2; 2026: 3.
7 papers.
- 2025Constrained Decoding of Diffusion LLMs with Context-Free Grammarscited by 14
- 2024Statically Contextualizing Large Language Models with Typed Holescited by 9
- 2025LeanTutor: Towards a Verified AI Mathematical Proof Tutorcited by 4
- 2021Report of the Workshop on Program Synthesis for Scientific Computingcited by 0
- 2026LeanTutor: Towards a Verified AI Mathematical Proof Tutorcited by 0
- 2026Generative Compilation: On-the-Fly Compiler Feedback as AI Generates Codecited by 0
- 2026A-JIT: Agentic Just-In-Time Software Constructioncited by 0
- 2026A-JIT: Agentic Just-In-Time Software Construction9 Sep 2026
- 2026Generative Compilation: On-the-Fly Compiler Feedback as AI Generates Code15 Jul 2026
- 2026LeanTutor: Towards a Verified AI Mathematical Proof Tutor24 Jan 2026
- 2025Constrained Decoding of Diffusion LLMs with Context-Free Grammars13 Aug 2025
- 2025LeanTutor: Towards a Verified AI Mathematical Proof Tutor10 Jun 2025
- 2024Statically Contextualizing Large Language Models with Typed Holes2 Sep 2024
- 2021Report of the Workshop on Program Synthesis for Scientific Computing2 Feb 2021