Lune

POPL2020顶会

Kind inference for datatypes

Ningning Xie, Richard A. Eisenberg, Bruno C. d. S. Oliveira

摘要

This technical supplement to Kind Inference for Datatypes serves to expand upon the text in the main paper. It contains detailed typing rules, proofs, and connections to the Glasgow Haskell Compiler (GHC). Sections in this document are meant to connect to sections in the main paper. There are many hyperlinks throughout, especially those highlighting the connections to GHC; you may wish to read on a computer instead of on paper.

This section accompanies Section 8 of the main paper, including discussion about more related language extensions. These extensions affect kind inference, but not in a fundamental way.

Besides specified type variables for which users can optionally provide type arguments, Haskell also incorporates visible dependent quantification (VDQ) 1 , e.g., type T :: ∀(k :: ⋆) → k → ⋆, with which users are forced to provide type arguments to T . That is, one would use T with, e.g., T ⋆ Int and T (⋆ → ⋆) Maybe, never just T Int. Visible dependent quantification is Haskell's equivalent to routine dependent quantification in dependently typed languages.

To support VDQ, rule dt-tt needs to be extended, as VDQ brings variables into scope for later reference. For example, given type T :: ∀(k :: ⋆) → k → ⋆ data T k a = MkT We should get a context k :: ⋆, a :: k when checking MkT .

VDQ opens an interesting design choice: should unannotated type variables be able to introduce VDQ? For example, in the definition of P below, we use f and a as the arguments to T . To make it type-check, we need to infer P :: ∀(f :: ⋆) → f → ⋆.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper2

  1. Verifying replicated data types with typeclass refinements in Liquid HaskellYiyun Liu, James Parker, Patrick Redmond, Lindsey Kuper 等OOPSLA 2020 · 24 次引用
  2. Practical Type Inference with LevelsAndong Fan, Han Xu, Ningning XiePLDI 2025 · 3 次引用

相关 Paper

  1. Encode the Cake and Eat It Too: Controlling Computation in Type Theory, LocallyYann Leray, Théo WinterhalterPOPL 2026
  2. Partial type constructors: or, making ad hoc datatypes less ad hocMark P. Jones, J. Garrett Morris, Richard A. EisenbergPOPL 2020 · 1 次引用
  3. Bounded Sort Polymorphism with Elimination ConstraintsJohann Rosain, Tomás Díaz, Kenji Maillard, Matthieu Sozeau 等POPL 2026
  4. Let Generalization, Polymorphic Recursion, and Variable Minimization in Boolean-Kinded Type SystemsJoseph A. ZulloPOPL 2026 · 1 次引用
  5. Greedy Implicit Bounded QuantificationChen Cui, Shengyi Jiang, Bruno C. d. S. OliveiraOOPSLA 2023 · 9 次引用
黄昏的海面,两侧是细线勾勒的悬崖