Partial Type Constructors in Practice
summary
Proposes making partial type constructors explicit in Haskell by encoding well-formedness as constraints (implemented via type families and data-type contexts) and adding an elaboration pass that pulls those constraints into signatures; implements the extension in GHC and bootstrapped GHC plus core libraries to test impact. Results show minimal disruption: under 10% of type signatures change overall, ~7% of compiler classes/instances and ~9.7% of library classes change, with Transformers accounting for ~86% of library edits; some APIs need redesign (Applicative vs Monoidal).
AI-written summary · about
chapters (8)
- 0:00The problem of partiality
- 1:01Limitations of current kinding
- 3:40Explicit partiality predicates
- 6:17Integrating into type systems
- 8:50Implementation approaches
- 11:40Compiler elaboration strategy
- 14:31Empirical validation
- 17:18Applicative and future work
related talks
49mMaking sense of the Haskell type system
01h 07mBuilding a Dependently Typed Language in Haskell Part 1
01h 26mImplementing Dependent Pattern Matching and Type Unification Part 2
01h 28mInto the Core Squeezing Haskell into nine Constructors
01h 02mType Inference in GHC
59mKeynote: Dependently-Typed Haskell
50mTemplate Haskell, a case study in (in)stability
38mType-level interfaces in Haskell & Rust: pragmatic type-level programming
