You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proof: Hindley-Milner soundness + principal types + decidability of unification #517
majorMajor issue — significant scope, broader impact than a feature/bugpriority:p3Low - nice to havescope:repoConfined to this repositorystatus:readyFully specified and ready to be picked uptech-debtKnown shortcut, drift, or hygiene owed - includes cleanup
Prove three Hindley-Milner properties for the type-inference engine in lib/typecheck.ml + lib/unify.ml:
Soundness: if inference accepts e at type τ, then e has type τ under the declarative typing rules.
Principal types: if e is typable, inference returns the most general type (every other typing of e is an instance of the inferred type via substitution).
Decidability of unification: the unification algorithm over TyVar / TyApp / record-row variables / effect-row variables terminates on all inputs.
Mechanisation
Coq preferred for HM (existing literature in Coq is dense — Wand 1987, Damas-Milner 1982, Pottier-Rémy 2005). Target: formal/Inference/{HM.v, Unify.v, Principal.v, Decidability.v}.
The unification termination argument uses a well-founded measure on type-term DAGs (occurs-check rules out cycles); Coq.Wellfounded supports this directly.
Concretely
The codebase already has the level-based generalisation pattern (Typecheck.fresh_level); the proof should follow the standard correctness theorem for algorithm W (or the variant the checker actually implements).
Size
L. Estimate: 2–3 weeks. Heavy on existing literature; less novel than the borrow proofs.
majorMajor issue — significant scope, broader impact than a feature/bugpriority:p3Low - nice to havescope:repoConfined to this repositorystatus:readyFully specified and ready to be picked uptech-debtKnown shortcut, drift, or hygiene owed - includes cleanup
Activity
ci: make the four required status checks reportable on every PR (#645)