Skip to content
Free planNo credit card requiredStart writing

article · Journal of Functional Programming · 2002

Type-checking multi-parameter type classes

Dominic Duggan, John Ophel

Cited by 18Open access

Abstract

Type classes are a novel combination of parametric polymorphism and constrained types. Although most implementations restrict type classes to be single-parameter, the generalization to multi-parameter type classes has gained increasing attention. A problem with multi-parameter type classes is the increased possibilities they introduce for ambiguity in inferred types, impacting their usefulness in many practical situations. A new type-checking strategy, domain-driven unifying resolution , is identified as an approach to solve these problems. Domain-driven unifying resolution is simple, efficient, and practically useful. However, even with severe restrictions on instance definitions, it is not possible to guarantee that type-checking with unifying resolution terminates. This is in contrast with the naive generalization of single parameter resolution strategies. Domain-driven unifying resolution is guaranteed to terminate if the type class constraints are satisfiable; however satisfiability is undecidable even with severe restrictions on instance definitions. These results shed some light on ambiguity problems with multi-parameter type classes.

Cite this paper

APA 7

Duggan, D., & Ophel, J. (2002). Type-checking multi-parameter type classes. Journal of Functional Programming, 12(2), 133–158. https://doi.org/10.1017/s0956796801004233

MLA 9

Duggan, Dominic, and John Ophel. “Type-checking multi-parameter type classes.” Journal of Functional Programming, vol. 12, no. 2, 2002, pp. 133–58, https://doi.org/10.1017/s0956796801004233.

Chicago

Duggan, Dominic, and John Ophel. 2002. “Type-checking multi-parameter type classes.” Journal of Functional Programming 12 (2): 133–58. https://doi.org/10.1017/s0956796801004233.

Harvard

Duggan, D. and Ophel, J. (2002) ‘Type-checking multi-parameter type classes’, Journal of Functional Programming, 12(2), pp. 133–158. Available at: https://doi.org/10.1017/s0956796801004233.

BibTeX
@article{duggan2002type,
  title = {{Type-checking multi-parameter type classes}},
  author = {Duggan, Dominic and Ophel, John},
  journal = {Journal of Functional Programming},
  volume = {12},
  number = {2},
  pages = {133--158},
  year = {2002},
  doi = {10.1017/s0956796801004233}
}

Made from the index record. Check names, capitalisation and page numbers against the paper. Need another style? AI for Research has over 10,000.