Journal of Functional Programming · 2002 · 18 citations · 14 references
ComputingComputer ScienceFormal MethodsProgramming LanguagesTheory Of ComputationAmbiguity ResolutionConstraint SatisfactionData TypesType CheckingType SystemsConstraintsParametric PolymorphismPolymorphic Type SystemsType ClassesType ConstraintsType InferenceType Polymorphism
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.
14
How to make ad-hoc polymorphism less ad hoc
Philip Wadler, Stephen Blott · 1989 · 770 citations · Full text
Monad transformers and modular interpreters
Sheng Liang, Paul Hudak, Mark P. Jones · 1995 · 504 citations · Full text
Cordelia Hall, Kevin Hammond, Simon Jones et al. · ACM Transactions on Programming Languages and Systems · 1996 · 251 citations · Full text
A system of constructor classes
Mark P. Jones · 1993 · 123 citations
Type classes: an exploration of the design space
Simon Peyton Jones, Mark P. Jones, Erik Meijer · 1997 · 120 citations