On Termination, Confluence and Consistent CHR-based Type Inference
Gregory J. Duck, Remy Haemmerle, Martin Sulzmann

TL;DR
This paper explores conditions under which CHR-based type inference remains consistent even when the underlying CHR programs do not terminate, addressing practical challenges in Haskell's type system.
Contribution
It introduces and verifies relaxed criteria like range-restrictedness, local confluence, and ground termination to ensure consistency in non-terminating CHR programs.
Findings
Identifies conditions ensuring consistency without termination
Verifies criteria for non-terminating but consistent CHR programs
Addresses practical issues in Haskell's type inference system
Abstract
We consider the application of Constraint Handling Rules (CHR) for the specification of type inference systems, such as that used by Haskell. Confluence of CHR guarantees that the answer provided by type inference is correct and consistent. The standard method for establishing confluence relies on an assumption that the CHR program is terminating. However, many examples in practice give rise to non-terminating CHR programs, rendering this method inapplicable. Despite no guarantee of termination or confluence, the Glasgow Haskell Compiler (GHC) supports options that allow the user to proceed with type inference anyway, e.g. via the use of the UndecidableInstances flag. In this paper we formally identify and verify a set of relaxed criteria, namely range-restrictedness, local confluence, and ground termination, that ensure the consistency of CHR-based type inference that maps to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
