Relational Nullable Types with Boolean Unification
summary
Proposes a concrete type system that records two Boolean formulas per expression to track may-null and may-present, extends Hindley‑Milner with Boolean unification, and adds a restricted pattern construct called choose (implemented as a Flix data type) so exhaustiveness becomes a type-level constraint. Shows Algorithm W–style inference and principal types, proves soundness, implements it in Flix, and finds the pattern in 108 GitHub projects where relational nullability is enforced at runtime today.
AI-written summary · about
