A theory of overloading
- 1 November 2005
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 27 (6) , 1216-1269
- https://doi.org/10.1145/1108970.1108974
Abstract
We present a novel approach to allow for overloading of identifiers in the spirit of type classes. Our approach relies on a combination of the HM(X) type system framework with Constraint Handling Rules (CHRs). CHRs are a declarative language for writing incremental constraint solvers, that provide our scheme with a form of programmable type language. CHRs allow us to precisely describe the relationships among overloaded identifiers. Under some sufficient conditions on the CHRs we achieve decidable type inference and the semantic meaning of programs is unambiguous. Our approach provides a common formal basis for many type class extensions such as multiparameter type classes and functional dependencies.Keywords
This publication has 21 references indexed in Scilit:
- A theory of type polymorphism in programmingPublished by Elsevier ,2003
- Open and closed scopes for constrained genericityTheoretical Computer Science, 2002
- Type-checking multi-parameter type classesJournal of Functional Programming, 2002
- Do we need dependent types?Journal of Functional Programming, 2000
- Theory and practice of constraint handling rulesThe Journal of Logic Programming, 1998
- Operational semantics and confluence of constraint propagation rulesPublished by Springer Nature ,1997
- The execution algorithm of mercury, an efficient purely declarative logic programming languageThe Journal of Logic Programming, 1996
- Type Reconstruction for Type ClassesJournal of Functional Programming, 1995
- The integration of functions into logic programming: From theory to practiceThe Journal of Logic Programming, 1994
- Type inference with polymorphic recursionACM Transactions on Programming Languages and Systems, 1993