Type classes in Haskell

  • K Hammond ,
  • SL Peyton Jones ,
  • PL Wadler ,
  • CV Hall ,
  • Simon Peyton Jones

ACM Transactions on Programming Languages and Systems, European Symposium on Programming (ESOP'94) |

Published by Springer Verlag LNCS 788

This paper defines a set of type inference rules for resolving overloading introducted by type classes. Programs including type classes are transformed into ones which may be typed by the Hindley-Milner inference rules. In contrast to an other work on type classes, the rules presented here relate directly to user programs. An innovative aspect of this work in the use of second-order lambda calculus to record type information in the program.