Lune

OOPSLA2024Top-tier venue

Persimmon: Nested Family Polymorphism with Extensible Variant Types

Anastasiya Kravchuk-Kirilyuk, Gary Feng, Jonas Iskander, Yizhou Zhang, Nada Amin

Abstract

Many obstacles stand in the way of modular, extensible code. Some language constructs, such as pattern matching, are not easily extensible. Inherited code may not be type safe in the presence of extended types. The burden of setting up design patterns can discourage users, and parameter clutter can make the code less readable. Given these challenges, it is no wonder that extensibility often gives way to code duplication. We present our solution: Persimmon, a functional system with nested family polymorphism, extensible variant types, and extensible pattern matching. Most constructs in our language are built-in "extensibility hooks," cutting down on the parameter clutter and user burden associated with extensible code. Persimmon preserves the relationships between nested families upon inheritance, enabling extensibility at a large scale. Since nested family polymorphism can express composable extensions, Persimmon supports mixins via an encoding. We show how Persimmon can be compiled into a functional language without extensible variants with our translation to Scala. Finally, we show that our system is sound by proving the properties of progress and preservation.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Certified Compilers à la Carte cites Extensible Metatheory Mechanization via Family Polymorphism
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Certified Compilers à la CarteOghenevwogaga Ebresafe, Ian Zhao, Ende Jin, Arthur Bright et al.PLDI 2025 · 2 citations

Builds on1

  1. Extensible Metatheory Mechanization via Family PolymorphismEnde Jin, Nada Amin, Yizhou ZhangPLDI 2023 · 10 citations

Related papers

  1. The Ultimate Conditional SyntaxLuyu Cheng, Lionel ParreauxOOPSLA 2024 · 2 citations
  2. Type-level programming with match typesOlivier Blanvillain, Jonathan Immanuel Brachthäuser, Maxime Kjaer, Martin OderskyPOPL 2022 · 10 citations
  3. Modular Type Safety for Traits with Extensible Variants and Deep Pattern MatchingAndong Fan, Lionel Parreaux, Ningning XieOOPSLA 2026
  4. Decidable subtyping for path dependent typesJulian Mackay, Alex Potanin, Jonathan Aldrich, Lindsay GrovesPOPL 2020 · 13 citations
  5. Recursive Program Synthesis using ParamorphismsQiantan Hong, Alex AikenPLDI 2024 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines