Sound and Decidable Type Inference for Functional Dependencies
Abstract
Functional dependencies are a popular and useful extension to Haskell style type classes. In this paper, we give a reformulation of functional dependencies in terms of Constraint Handling Rules (CHRs). In previous work, CHRs have been employed for describing user-programmable type extensions in the context of Haskell style type classes. Here, we make use of CHRs to provide for the first time a concise result that under some sufficient conditions, functional dependencies allow for sound and decidable type inference. The sufficient conditions imposed on functional dependencies can be very limiting. We show how to safely relax these conditions.
BibTeX
@inproceedings{duck2004sound,
author = {Gregory J. Duck and Simon L. Peyton Jones and Peter J. Stuckey and Martin Sulzmann},
title = {{Sound and Decidable Type Inference for Functional Dependencies}},
booktitle = {ESOP},
year = {2004},
doi = {10.1007/978-3-540-24725-8\_5},
}Ask Althea to put this paper to the test.
| Understanding functional dependencies via constraint handling rules | J. Funct. Program · 2007 |
| Type Classes and Constraint Handling Rules | arXiv · 2000 |
| Improved Inference for Checking Annotations | arXiv · 2005 |
| HM(X) type inference is CLP(X) solving | J. Funct. Program · 2008 |
| Type Inference for Guarded Recursive Data Types | arXiv · 2005 |
| Proofs for free - Parametricity for dependent types | J. Funct. Program · 2012 |